/// CONVERT
1 credit

HTML to PDF API — faithful to your CSS

The Chromium-based renderer built for invoices, receipts, and reports.

/// Quick answer

ASHDOCS renders an HTML template containing `{{ }}` variables, `for` loops and conditionals into a PDF in a single request, substituting values from a `data` object you send alongside the markup. Strict mode refuses to ship a document that still contains unfilled placeholders and returns the missing variable names instead.

Try HTML to PDF API — free →Read the docs

Free account. No card required.

How does the HTML to PDF API work?

One HTTP request from any language. Every ASHDOCS endpoint uses the same X-API-Key header.

curl -X POST https://www.ashdocs.com/api/v1/tools/html-to-pdf \
  -H "X-API-Key: ash_live_..." \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Invoice #1042</h1>","options":{"format":"A4","printBackground":true}}'

Example input

<h1>Invoice #INV-2026-0042</h1>
<p>Amount due: $175.00</p>

How do I use HTML to PDF API in Make, Zapier or n8n?

MAKE

Add an HTTP "Make a request" module, POST your HTML as JSON, and turn off Parse response so the binary arrives intact.

Make setup guide →
ZAPIER

Use Webhooks by Zapier with a POST action and map the returned file URL into your next step.

Zapier setup guide →
n8n

Use the HTTP Request node with Response Format set to File.

n8n setup guide →
AIRTABLE

Trigger an automation on a record change and call the endpoint with the Send request action.

Airtable setup guide →

Common problems and fixes

SymptomCauseFix
Background colours are missingPrint rendering suppresses backgrounds by defaultSet printBackground: true in your options
Table headers appear only on the first pageA thead does not repeat unless told toAdd thead { display: table-header-group; } to your CSS
Fonts are substitutedThe rendering container has almost no fonts installedLoad web fonts explicitly with @font-face and an absolute URL
Images do not appearAssets must be reachable from the public internetHost images publicly and reference them by absolute URL
Content splits mid-row across pagesNo page-break rules are applied by defaultAdd page-break-inside: avoid to rows and cards

Common use cases

Frequently asked questions

Which templating syntax does it use?+

Sandboxed Jinja2 — {{ variable }}, {% for %} and {% if %} over the data object you send.

Can I use web fonts?+

Name fonts that are installed on the renderer, or upload them as font assets and list their ids in fonts on the v2 route. A font the renderer cannot find is silently substituted and your layout will move.

Why does my table header only appear on page one?+

Because the thead is not set to repeat. Add four rules to your print CSS: table { break-inside: auto; } tr { break-inside: avoid; } thead { display: table-header-group; } .totals { break-inside: avoid; } — the third repeats the header on every page; the others stop a row or the totals block splitting across a page.

How much does one render cost?+

One credit.

RELATED TOOLS