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.
Keep your markup in your app
Use raw HTML when your application already builds the document. Send HTML, CSS and Liquid data in the request; you do not need to create a saved template. This is rendering, not an interactive browser session.
Receipt after checkout
Your checkout supplies the receipt number, buyer and paid amount. The HTML controls the layout; PixlDocs does not calculate payments or taxes.
Report from database rows
Build a Liquid loop over your report rows and set the page size and margins. Use PDF when every page matters, rather than a first-page image.
Move an existing print layout
Start with static HTML and CSS. Compare fonts, page breaks and images against your current output before replacing your renderer.
The request
A complete receipt request — no template ID needed
curl --fail-with-body https://api.pixldocs.com/v1/render/html \
-H "Authorization: Bearer $PIXLDOCS_API_KEY" \
-H "Content-Type: application/json" \
--output receipt.pdf \
-d '{
"html": "<h1>Receipt {{ number }}</h1><p>Customer: {{ customer }}</p><p>Paid: {{ amount }}</p>",
"styles": "body { font-family: sans-serif; }",
"page_setup": { "size": "A4" },
"format": "pdf",
"data": { "number": "R-1041", "customer": "Sample Buyer", "amount": "USD 42.00" }
}'Set PIXLDOCS_API_KEY to your own workspace key in your terminal. This request saves the response as receipt.pdf. The values are illustrative, not customer evidence.
- 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.
Before you automate it
- Compute totals and chart data in your app. Scripts that click, wait for network calls or draw a chart do not run as a browser automation session.
- Use bundled fonts or inline font files. Remote webfonts are rejected; substitutions are reported in X-Pixldocs-Font-Substituted.
- Images must use allowed asset hosts. A failed image fetch is an error, not a successful PDF containing an empty image.
- For raw HTML, PNG and WebP return page one only. Choose PDF to retain a multi-page report.
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. Try a real example without an account, or create a free account to integrate your own templates. Free setup help is available; business teams can talk to us separately.
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.