Template based PDF generator
Generate dynamic PDFs from templates
Stop building HTML strings inside your application. Save a template once with placeholders, then create dynamic documents by sending JSON. The layout lives in the template, your code sends only the data.
Create documents from templates
Define an HTML template with placeholders, store it, then generate a document by passing values. Update the design without touching application code or redeploying.
// Save a template once, then generate dynamic PDFs by sending data.
const res = await fetch("https://api.pdfpipe.xyz/v1/pdf", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PDFPIPE_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
template_id: "tmpl_certificate",
data: { name: "Ada Lovelace", course: "Algorithms", date: "2026-06-17" },
}),
});Why template based generation
Separation of concerns
Designers own the template, engineers own the data. Layout changes do not become code changes.
Dynamic by default
Every render pulls live values, so a thousand records produce a thousand correct documents.
Versionable
Templates are managed per API key, so you can iterate on layout safely.
What you can template
- Invoices and receipts from order data.
- Reports and statements on a schedule.
- Certificates issued on completion.
- Contracts and agreements personalized per signer.
Frequently asked
What is a template based PDF generator?
A service that turns a reusable template plus data into a finished PDF. You save the layout once, then generate documents by sending values, so generation is dynamic and data-driven.
How do I create documents from templates?
Create a template with placeholders, then POST the template id and a data object. The API fills the template and returns the dynamic PDF.
Can the template use my own design?
Yes. Templates are plain HTML and CSS, so your fonts, colors, and layout carry over exactly.
Is this good for a dynamic PDF generator at scale?
Yes. Combine templates with the batch endpoint and webhooks to generate large document sets without holding a request open.
Which PDF API do you need?
These pages cover related search intents. Pick the one that matches what you are building.
500 free documents a month, flat pricing after that, and a live playground you can try without signing up.