Build a Certificate Template
Create elegant, personalized certificates that can be generated at scale.
What You'll Build
A professional certificate of completion (or achievement, participation, etc.) with decorative borders, a recipient name, course details, and a date. Perfect for online courses, workshops, or recognition programs.
Step 1: Set Up the Page
- Create a new template named "Certificate"
- Set page size to A4 Landscape — certificates look best in landscape
- Set a background color or add a background image for texture
- Use generous margins (60px+) to frame the content elegantly
Step 2: Create a Border
Add a large rectangle or use line elements to create an elegant border. You can:
- Use a rectangular element with a decorative border (e.g., double border, gold color)
- Layer multiple rectangles for a double-frame effect
- Use an image element with a decorative border pattern
Step 3: Add Organization Branding
- Add your organization logo centered at the top
- Add a text element with your organization name in an elegant font
- Consider using a subtle color scheme that matches your brand
Step 4: Add the Certificate Title
- Add a large text element: "Certificate of Completion"
- Use a serif or decorative font at 36–48px
- Center it horizontally on the page
- Add a decorative line element below as a divider
Step 5: Add Dynamic Content
These fields will be different for each certificate:
- Add text: "This is to certify that"
- Add a Field element with key
recipient_name— make it large (28–32px), bold, and prominent - Add text: "has successfully completed"
- Add a Field element with key
course_name - Add a field for
completion_date - Optionally add fields for
instructor_nameandcertificate_id
Center all text elements horizontally. Certificates look best with a symmetrical, centered layout.
Step 6: Add Signature Lines
- Add a line element for the signature underline
- Add a text element below it for "Authorized Signature"
- Optionally add an Image element above the line for a signature image
- You can add a second signature area with a field for
instructor_name
Generate via API
TypeScript
const pdf = await client.generate({
templateId: "tmpl_your_certificate",
data: {
recipient_name: "Sarah Johnson",
course_name: "Advanced Data Analysis with Python",
completion_date: "January 20, 2026",
instructor_name: "Dr. James Chen",
certificate_id: "CERT-2026-0042",
},
});Bulk Generation
Generate certificates for all participants in a batch:
TypeScript
const participants = [
{ name: "Sarah Johnson", email: "sarah@example.com" },
{ name: "Mike Chen", email: "mike@example.com" },
{ name: "Lisa Park", email: "lisa@example.com" },
// ... hundreds more
];
for (const participant of participants) {
const pdf = await client.generate({
templateId: "tmpl_certificate",
data: {
recipient_name: participant.name,
course_name: "Advanced Data Analysis",
completion_date: "January 20, 2026",
},
});
// Send via email, upload to S3, etc.
await sendCertificateEmail(participant.email, pdf);
}Document Stack handles the rendering — you focus on your application logic. Whether you're generating 1 or 10,000 certificates, the API works the same.