Generate reports from HTML, in one API call
report PDF API
A report is what a dashboard becomes when someone needs to file, print or email it. Because the renderer is Chrome-grade, the charts, tables and CSS you already render in the browser come out pixel-perfect — add a cover page, page numbers and a running footer for free.
No credit card · 25 free credits to start
OVERVIEW
What is the report PDF API?
The report PDF API is an HTTP endpoint that renders a multi-page report from HTML in one request. You POST your report HTML (charts, tables and all) or a stored template plus data to /v1/render and get a print-ready PDF back in about 400ms — a Chrome-grade engine, so the charts and CSS look exactly as they do in the browser.
A report is what a dashboard becomes the moment someone needs to file it, print it, or email it to a board. The data is the same; the demands are different. It has to render the charts and tables you already show on screen without flattening them, carry a cover page and section breaks, number its pages, and hold a running footer — all of which is fiddly to bolt onto a PDF library that does not speak real CSS.
Generating reports from HTML works because the renderer is Chrome-grade: flexbox, grid, gradients, web fonts and inline SVG come out exactly as they do in the browser. That means the charts you already build — as PNG/SVG, or as inline SVG you render server-side — drop straight into the report and stay crisp, and the data tables lay out with the same CSS you ship to your app. There is no screenshot-and-stitch step and no chart library to re-implement for print.
Reports are often bespoke, so this is the use case where you most often send raw html instead of a stored template — build the document server-side from your metrics and POST the whole string to /v1/render. Standard CSS break rules force a cover page and section dividers, and the renderer adds page numbers and a running header/footer to long documents with no pagination math. The PDF comes back in roughly 400 milliseconds and nothing is stored on our side; the bytes are streamed back and discarded. For a pure transaction ledger rather than a chart-led summary, the statement PDF API covers the same paginated-table territory.
THE PROBLEM
Generating reports in-house is a two-week project you'll maintain forever
Turning HTML into a clean PDF yourself means running headless Chrome and everything around it. Here's the work you skip.
- Re-implementing your dashboard charts in a PDF library that does not support real CSS.
- Adding a cover page, section breaks and page numbers to a long report by hand.
- Running a screenshot service and stitching images into a document.
- Scaling a headless-Chrome fleet just to export reports on demand.
THE SOLUTION
From your data to a finished report, in one request
Store your reports layout once, then POST the values to /v1/render and get print-ready application/pdfbytes back in roughly 400ms. Merge is plain{{ }} /{{{ }}} and dotted keys — no template loops to learn, so repeating rows are rendered to HTML and dropped in through one raw placeholder.
- Chrome-grade rendering. Flexbox, grid, gradients, inline SVG and web fonts render exactly as they do in the browser — your charts come out crisp.
- Cover pages & sections. Force page breaks for a cover page and section dividers with standard CSS break rules.
- Page numbers on long docs. Multi-page reports get page numbers and a running header/footer with no manual pagination.
curl https://api.pdfinvoiceapi.com/v1/render \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"template": "tpl_report",
"data": {
"title": "Q2 2026 Performance",
"period": "Apr – Jun 2026",
"summaryHtml": "<p>Revenue grew 18% quarter over quarter.</p>",
"chartUrl": "https://acme.co/charts/q2-revenue.png"
},
"pdf": { "format": "A4", "margin": "16mm", "printBackground": true, "landscape": false }
}' \
-o report.pdfHOW TO
How to generate reports from HTML
- 01
Build the report in HTML
Render the report as HTML and CSS — a cover page, section headings, data tables and your charts as <img> (PNG/SVG) or inline SVG. Use real CSS; flexbox, grid, gradients and web fonts all render faithfully.
- 02
Send raw HTML or store a template
For bespoke reports, build the document server-side and POST the whole thing as the html field. For a recurring report shape, store it once as a template and send just the data each period.
- 03
POST to /v1/render
Send your html (or template id) plus the pdf options with your API key. Force page breaks for the cover and sections with standard CSS break rules; the renderer adds page numbers and the running footer.
- 04
Stream the multi-page PDF back
The response body is the full report PDF — cover, charts, tables, page numbers and all. Email it, drop it in a bucket, or stream it to the browser, in roughly 400ms.
WHAT YOU GET
The features that matter for reports
Chrome-grade rendering
Flexbox, grid, gradients, inline SVG and web fonts render exactly as they do in the browser — your charts come out crisp.
Cover pages & sections
Force page breaks for a cover page and section dividers with standard CSS break rules.
Page numbers on long docs
Multi-page reports get page numbers and a running header/footer with no manual pagination.
FAQ
Reports on PDFInvoiceAPI — common questions
- How do I generate a report PDF from HTML?
- Build the report as HTML/CSS — cover page, charts, tables — and POST it as the html field (or use a stored template id plus data) to /v1/render. You get application/pdf bytes back in one synchronous call; the engine is Chrome-grade, so your CSS renders faithfully.
- Will my charts and data tables render correctly?
- Yes. The renderer is Chrome-grade, so flexbox, grid, gradients, web fonts and inline SVG come out exactly as in the browser. Charts work as <img> (PNG/SVG) or inline SVG, and data tables lay out with the same CSS you already ship — no screenshot-and-stitch.
- Can I add a cover page, page numbers and section breaks?
- Yes. Force a cover page and section dividers with standard CSS break rules, and the renderer adds page numbers and a running header/footer to long reports automatically — no manual pagination.
- Should I send raw HTML or a stored template for reports?
- Either works. Bespoke, one-off reports are easiest to build server-side and POST as the html field; a recurring report shape is better stored once as a template so each period’s request is just data.
- Can I use my own logo, fonts and brand colours?
- Always — the PDF is your own HTML/CSS, so the report carries your full brand. Drive the logo and accent colour from data, or save a brand kit and {{brand.logo}} / {{brand.color}} fill in automatically.
- Are my reports stored on your servers?
- No. Each report is streamed back in the response and discarded — the content is processed transiently and never persisted on our side.
RELATED
Same API, more documents
The render call that makes reports makes these too — one endpoint for everything your product hands a customer.
Account statements
Render multi-page account statements with page numbers and repeating headers.
View use case →Invoices
Turn order data into a branded, VAT-ready invoice PDF in one call.
View use case →Quotes & estimates
Send a branded, itemised quote or estimate PDF straight from your app.
View use case →Render your first report PDF in the next five minutes
One endpoint, real PDFs, 25 free credits to start. No credit card to begin.
Cancel anytime · no long-term contract