HTML to PDF API
Build reusable HTML and CSS templates in PDFox, bind JSON data with Handlebars, and return branded PDFs through an async API with webhooks and signed downloads.
Why this page exists
Developers searching for an HTML to PDF API usually need more than a one-off render. They need reusable templates, predictable pagination, brand assets, delivery URLs, and a workflow that does not break every time operations asks for a layout change.
PDFox gives you a template-first HTML to PDF API. Build the document once in code view or the visual editor, publish it, send JSON data to /generate, and let PDFox handle queueing, job status, downloads, and webhooks.
Explore next
Compare monthly PDF limits, webhooks, API access, and batch-friendly tiers.
Open page DocsReview authentication, generation, polling, downloads, and MCP setup.
Open page Use casesSee invoices, payslips, contracts, and delivery workflows built on PDFox.
Open page AISee how PDFox fits Claude, ChatGPT, and internal copilot workflows.
Open pageWhat PDFox gives you
Instead of posting a full HTML document every time, teams use PDFox to turn HTML templates into a repeatable document workflow.
Author templates in raw HTML and CSS or start in the visual editor, then publish a template ID your application can call repeatedly.
Use variables, loops, and conditionals inside your template so one layout can render thousands of document variations from structured data.
Queue generation jobs, poll status, or hand off to webhooks when rendering finishes. Your app does not need a homegrown worker pipeline.
Store logos, fonts, and template changes in one place so finance, ops, and engineering are not trading HTML fragments in Slack.
HTML template example
<style>
@page { size: A4; margin: 24px; }
body { font-family: Inter, sans-serif; color: #17231d; }
.total { font-weight: 700; }
</style>
<article class="invoice">
<h1>Invoice {{invoice.number}}</h1>
<p>{{client.name}}</p>
<table>
{{#each items}}
<tr>
<td>{{description}}</td>
<td>{{qty}}</td>
<td>{{formatCurrency unit_price "GBP"}}</td>
</tr>
{{/each}}
</table>
<p class="total">{{formatCurrency totals.grand_total "GBP"}}</p>
</article> Save the template in PDFox, publish it, then call POST https://api.pdf-fox.com/generate with the templateId and a JSON payload.
How teams use it
PDFox is a strong fit when documents are part of an operational workflow, not just a one-off conversion utility.
If finance, customer operations, or legal care about the layout, you want a reusable template workflow instead of HTML strings spread across app code.
When documents must be queued, tracked, retried, and delivered to another system, a rendering endpoint alone is not enough.
PDFox works well when the exact fonts, spacing, tables, and asset versions need to stay stable across every run.
If your documents are recurring and business-critical, use a template-first HTML to PDF API instead of reinventing rendering infrastructure.