An HTML to PDF API that converts raw HTML or a full template to a pixel-perfect PDF in milliseconds. No headless browser cluster to manage.
curl -X POST "https://screenshotcore.com/api/v1/screenshot" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source": "html",
"html": "<!DOCTYPE html><html><body><h1>Invoice #1042</h1><p>Amount due: $149.00</p></body></html>",
"format": "pdf",
"pdf_paper_format": "A4",
"pdf_margin": "20mm",
"pdf_print_background": true
}'Capabilities
Every parameter that matters for professional PDF output, exposed as a simple API field.
A4, Letter, Legal, or custom dimensions. Pass pdf_paper_format=A4 or define exact width × height in millimetres.
Uniform or per-side margins: pdf_margin=10mm or set pdf_margin_top/right/bottom/left independently.
CSS gradients, background images, and colors render by default. Set pdf_print_background=false for a clean white document.
Rotate to landscape with pdf_landscape=true, ideal for wide tables, timelines, or dashboards.
Scale the entire HTML document to exactly one PDF page with pdf_fit_one_page=true, perfect for invoices and certificates.
With our HTML to PDF API, large documents are rendered async and delivered via signed HMAC webhook. No polling required.
Use Cases
Any team that sends documents should be generating them programmatically.
Render branded invoice HTML templates to PDF on demand. Pixel-perfect and ready to email or store.
Stamp dynamic data into contract templates and output consistent PDFs for every customer.
Convert data-rich HTML reports to PDF for download, archiving, or scheduled delivery.
Write in HTML/CSS, export to a clean paginated PDF. No InDesign, no LaTeX needed.
Also available
100 free conversions per month. No credit card. Full API access from day one.
Get your free API key →FAQ
Everything you need to know before you ship.