Document Stack
Document Stack
Docs

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

  1. Create a new template named "Certificate"
  2. Set page size to A4 Landscape — certificates look best in landscape
  3. Set a background color or add a background image for texture
  4. 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

  1. Add your organization logo centered at the top
  2. Add a text element with your organization name in an elegant font
  3. Consider using a subtle color scheme that matches your brand

Step 4: Add the Certificate Title

  1. Add a large text element: "Certificate of Completion"
  2. Use a serif or decorative font at 36–48px
  3. Center it horizontally on the page
  4. Add a decorative line element below as a divider

Step 5: Add Dynamic Content

These fields will be different for each certificate:

  1. Add text: "This is to certify that"
  2. Add a Field element with key recipient_name — make it large (28–32px), bold, and prominent
  3. Add text: "has successfully completed"
  4. Add a Field element with key course_name
  5. Add a field for completion_date
  6. Optionally add fields for instructor_name and certificate_id
Center all text elements horizontally. Certificates look best with a symmetrical, centered layout.

Step 6: Add Signature Lines

  1. Add a line element for the signature underline
  2. Add a text element below it for "Authorized Signature"
  3. Optionally add an Image element above the line for a signature image
  4. 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.