Convert any HTML content or URL to a pixel-perfect PDF document. Supports full CSS styling, custom page sizes, headers, footers, and JavaScript rendering. Generate invoices, reports, tickets, and more.
{
"status": "ok",
"error": null,
"data": {
"marginLeft": "0.4in",
"marginRight": "0.4in",
"marginTop": "0.4in",
"marginBottom": "0.4in",
"landscape": false,
"pdfName": "c064eacc-c29f-43a1-8375-a4b2562ea9d8.pdf",
"expires": 1766096665366,
"downloadURL": "https://storage.googleapis.com/apiverve-helpers.appspot.com/htmltopdf/c064eacc-c29f-43a1-8375-a4b2562ea9d8.pdf?GoogleAccessId=1089020767582-compute%40developer.gserviceaccount.com&Expires=1766096665&Signature=R%2Ft%2FXcR%2B8bXzCi5ztc01YeE%2Bbn1ZR%2BCyeoqgHpSB1z0LO3SetOSoWYVoon5IG4vUU9W30Rmw6owErorZal%2FHdgpmcPAYx3eTx5dPaD45tFSCgIfpRloi0DBLse%2Fzy4sb0k3XgweiHZUdZu3jKMi1HVDJa2j2ervAFfwDfxGHUDXH5wwFKqnv%2BIw%2Fu7MBsKMDCNMWYESE7Aicz6eL0Lxz8P6oazJX0akKlLDhkgKiIqF3VtjGIh36RzK4WGBpU36JFZ7SCZZGHNiHyt3%2FBdyjPRA8N1fky%2Bv%2BjR%2BTTlO9BpWcjImNJM6nvVfmICEfcbLqL2MvVldfPAFKyEv2zCrCLA%3D%3D"
}
}






Convert any HTML content or URL to a pixel-perfect PDF document. Supports full CSS styling, custom page sizes, headers, footers, and JavaScript rendering. Generate invoices, reports, tickets, and more.
A single authenticated GET with the location you care about — no SDK required.
GET /v1/htmltopdf?query=… x-api-key: your_key
Each PDF is rendered with full CSS, JavaScript, and web font support for pixel-perfect document generation.
One structured object, typically under 200 ms — ready to render.
{ marginLeft, marginRight, marginTop, … }
Each PDF is rendered with full CSS, JavaScript, and web font support for pixel-perfect document generation.
Real applications shipping on this endpoint today — each with the numbers that made it worth wiring up.
See every use caseDesign your invoice in HTML/CSS, then use our API to generate perfect PDFs. Pass dynamic data (customer name, items, totals) and receive a downloadable PDF in seconds.
Render your report as HTML (including charts via JavaScript) and convert to PDF. Our Chromium-based renderer handles complex layouts, SVG charts, and custom fonts.
Convert any URL to a PDF archive. Capture the full page including JavaScript-rendered content. Store PDFs for long-term record keeping and compliance documentation.
Copy a working request, or install a typed SDK. Same endpoint, same key.
const res = await fetch("https://api.apiverve.com/v1/htmltopdf", { method: "POST", headers: { "x-api-key": "YOUR_API_KEY" } });
const { data } = await res.json();
console.log(data);Every related API ships with your key — no separate plans, no extra keys, one bill.
See pricingReady-made recipes for Zapier, Make, and n8n — trigger on an event, and the data lands where your team works.
Understanding different methods for creating PDFs from HTML and their tradeoffs.
Best practices for creating print-ready PDFs with proper margins, headers, and page breaks.
Techniques to reduce PDF file size and improve generation speed.
The same key unlocks every other APIVerve endpoint — reach for them when you need them.
Browse the catalog