HTML to PDF API
POST /v1/pdf/html receives a complete HTML page and returns its PDF. Mizanpage keeps neither the page nor the result.
The free trial lasts 14 days. No credit card is required.
curl -X POST https://api.mizanpage.com/v1/pdf/html \
-H "Authorization: Bearer mzp_…" \
-H "Content-Type: application/json" \
-d '{"html": "<!doctype html><html><body><h1>Bon de livraison</h1></body></html>",
"paper": "A4", "margins": 15}' \
-o livraison.pdf
The conversion
-
Any paper size
A3, A4, A5, Letter, Legal or a custom size in millimetres, in portrait or landscape.
-
Margins and backgrounds
Margins can be set side by side and backgrounds print by default. The
@pagerule of your CSS can set the size instead. -
A self-contained page
CSS, images and fonts sit inside the page as
data:URLs. The rendering engine opens no external address. -
Up to 10 MB
An HTML page weighs 10 MB at most. The PDF comes back in the same response.
The other PDF tools
-
Merge
POST /v1/pdf/mergecombines 2 to 20 PDFs into one, in the order sent. -
Split
POST /v1/pdf/splitextracts chosen pages, one range per file or one PDF every N pages. -
Free
Merging and splitting are free up to 300 calls per hour per workspace.
-
With an SDK
The official SDKs send the files for you, for example
mizanpage.pdf.fromHtml(html)in JavaScript.
Frequently asked questions
Convert your first page to PDF
The free trial lasts 14 days. No credit card is required.
Start free trial