auto_awesome PDF Templates

Design once. Generate forever.

Build reusable HTML templates with {{variables}} for your invoices, receipts, certificates, and reports. Pass data at render time — no layout work per request.

TechStartup Inc.
INV-2026-0047
INVOICE
Due: Jun 30, 2026
Bill ToGlobex Corp
ProjectQ2 Retainer
ItemQtyTotal
Engineering80h$12,000
Design20h$3,000
TOTAL
$15,000

How templates work

Three steps from template to PDF in your product.

draw
Step 01

Design your template

Write HTML + CSS in the visual template editor. Use {{variable}} syntax anywhere — in text, URLs, class names, or style values.

code
Step 02

Save & get a template ID

Each template gets a unique tpl_* ID. Reference it in API calls — your layout lives in ConvertStack, not your codebase.

picture_as_pdf
Step 03

Render with dynamic data

POST your template ID and a data payload. ConvertStack injects your variables, renders with Chromium, and returns a download URL — all in one request.

One API call. Any document.

Reference a template by ID and pass your data as JSON. ConvertStack handles the rest.

curl -X POST https://api.convertstack.run/v1/pdf \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "template_id": "tpl_a3f9c2e1b8d0...",
    "data": {
      "company_name": "Acme Corp",
      "invoice_number": "INV-2026-0047",
      "customer_name": "Globex Corp",
      "due_date": "2026-06-30",
      "total": "$15,000.00"
    }
  }'
const res = await fetch('https://api.convertstack.run/v1/pdf', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${process.env.CONVERTSTACK_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    template_id: 'tpl_a3f9c2e1b8d0...',
    data: {
      company_name: 'Acme Corp',
      invoice_number: 'INV-2026-0047',
      customer_name: 'Globex Corp',
      due_date: '2026-06-30',
      total: '$15,000.00',
    },
  }),
});

const { url } = await res.json();
console.log('PDF ready:', url);
import requests

response = requests.post(
    "https://api.convertstack.run/v1/pdf",
    headers={
        "Authorization": f"Bearer {CONVERTSTACK_API_KEY}",
        "Content-Type": "application/json",
    },
    json={
        "template_id": "tpl_a3f9c2e1b8d0...",
        "data": {
            "company_name": "Acme Corp",
            "invoice_number": "INV-2026-0047",
            "customer_name": "Globex Corp",
            "due_date": "2026-06-30",
            "total": "$15,000.00",
        },
    },
)

pdf_url = response.json()["url"]
print(f"PDF ready: {pdf_url}")

Built for teams that generate documents at scale

storefront

E-commerce & SaaS

Auto-generate invoices and receipts from order webhooks. Attach PDFs to confirmation emails without writing layout code.

school

EdTech & Courses

Issue personalized certificates at course completion. Batch-generate for 10,000 students as easily as for one.

analytics

Analytics & BI

Schedule weekly PDF reports from your data warehouse. Push to S3 or email recipients — no manual exports.

Template FAQ

What variable syntax does ConvertStack use?

Double curly braces: {{variable_name}}. Variables can appear in text, HTML attributes, style values, or even class names. Pass matching keys in the data object of your API request.

Can I loop over arrays (e.g. line items)?

Yes. The template engine supports {{#each items}} blocks for repeating sections. Iterate over line items, table rows, or any JSON array in your data payload.

Can I use custom fonts and CSS in templates?

Absolutely. Templates support any valid CSS including web fonts, flexbox, grid, and custom properties. The visual editor lets you write and preview CSS alongside your HTML in real time.

Is there a limit on how many templates I can create?

No hard limit on templates — create as many as your different document types require. Each rendering call deducts from your conversion credit quota, not template storage.

Can I version-control my templates?

Templates are managed via the dashboard and API. You can create, update, and delete templates programmatically using the /v1/templates endpoints, making it easy to integrate with your CI/CD pipeline.

Start building
with templates

Join the waitlist for early access. First 1,000 conversions free — no credit card required.