PDF API · HTML to PDF API
Turn HTML into print-ready PDFs with one API call.
POST your markup and data, receive the PDF in the response. Page size, margins, pagination and fonts are handled by the renderer — no headless browser to run yourself.
Opens a real a tax invoice with sample data — edit a field and download the PDF. No account or card for the example. PixlDocs is free for 1 year.
Real output

Multi-page invoice, page 1

Same invoice, page 2 — header repeats

Paginated account statement
Rendered through the production pipeline from published templates with sample data.
The request
POST /v1/render/html
curl -X POST https://api.pixldocs.com/v1/render/html \
-H "Authorization: Bearer pxd_YOUR_KEY" \
-H "Content-Type: application/json" \
--output receipt.pdf \
-d '{
"html": "<h1>Receipt {{ number }}</h1><p>Thanks, {{ customer }}.</p>",
"styles": "body { font-family: Helvetica; }",
"page_setup": { "size": "A4", "margin": { "top": "20mm", "bottom": "20mm" } },
"data": { "number": "R-1041", "customer": "Acme Corp" }
}'Replace pxd_YOUR_KEY with a key from your dashboard. The response body is the file.
- No template required
- POST /v1/render/html takes raw HTML, CSS and data.
- Liquid placeholders
- Fill {{ fields }} from JSON at render time.
- Real page setup
- A4, Letter, custom margins and running headers.
- PDF, PNG or WebP
- Same request, choose the output format.
Questions
Do I need to create a template first?
No. /v1/render/html renders markup you send. Save it as a template later if you want a stable field contract and reuse.
Can I render an existing web page?
Yes — POST /v1/render/url renders a public URL to PDF.
Is it free?
Yes. PixlDocs is free for 1 year from 3 October 2026 while we work with early users. You can try a real example with no account; a free account starts with 100 credits, and you can ask us for more free credits when you run out.
Try it on sample data, then bring your own document.
Start with the free example. If your document or data source is different, send us one sample and tell us where the data lives — we set up the first template with you, free. Business and enterprise teams can contact us separately.