Getting started / Introduction
Documentation
PDFglyph turns reusable HTML templates into pixel-identical PDFs through a single API call. You design a template once, test it against sample data right in the browser, then send real data to one endpoint and get the finished document back in the response.
It is built for developers: raw HTML and CSS (no proprietary drag-and-drop format), a preview that renders through the exact same engine as production, and an API surface small enough to learn in an afternoon.
curl -X POST https://api.pdfglyph.dev/v1/generate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"templateId": "tpl_invoice_8x2k",
"data": {
"customer": "Northwind Ltd",
"number": "INV-2048",
"total": "€1,240.00"
}
}' \
--output document.pdfHow it works
- Create a template. Write HTML with Handlebars placeholders
(
{{customer}},{{#each items}}…{{/each}}) in the in-browser editor. - Test it. Provide a sample JSON payload and preview the rendered PDF instantly. The preview uses the same Chromium render path as the API, so what you see is what your users get.
- Publish a version. Freeze the current draft as an immutable, numbered version. The API always renders a published version, never your half-finished draft.
- Call the API. Authenticate with a key,
POSTyour data to/v1/generate, and the response body is the PDF.
What makes it different
Two things are the whole product: rendering fidelity ("identical to the real output, every time") and a frictionless developer experience. Everything below is in service of those.
- One render path. The dashboard preview and the production API run the identical HTML, CSS, and page settings through the same headless Chromium. There is no "preview engine" that drifts from the real one — any difference is treated as a bug.
- Immutable versions. Editing a template never changes what your live integration renders. You publish a version explicitly, and you can roll back to any earlier one.
- Honest accounting. A failed call never consumes your quota, and a successful render and its usage count are written in a single transaction, so billing can never disagree with what actually rendered.
- Privacy by default. Generated PDFs are never stored. Request payloads are only retained if you opt a template in.
Where to go next
New here? Start with the Quickstart and you will have a PDF in about five minutes. Otherwise, browse the docs:
Getting started
Templates
- The editorWrite HTML + Handlebars, test with sample data.
- Handlebars referenceEvery expression and block helper the engine supports.
- Page setup & print CSSPage size, margins, and page breaks.
- Fonts & imagesEmbedding assets and the fidelity rules.
- Versioning & rollbackDrafts, published versions, and preview fidelity.
API reference
Guides
Today PDFglyph outputs PDF. Image and HTML-email outputs are on the roadmap.