Home/HTML to PDF
POST /capture · format=pdf

Convert any HTML to PDF.
One REST call.

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.

A4 · Letter · Legal · customBackgrounds & fontsAsync webhooks100 free/month
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

Full control with an HTML to PDF API

Every parameter that matters for professional PDF output, exposed as a simple API field.

Custom paper sizes

A4, Letter, Legal, or custom dimensions. Pass pdf_paper_format=A4 or define exact width × height in millimetres.

Precise margin control

Uniform or per-side margins: pdf_margin=10mm or set pdf_margin_top/right/bottom/left independently.

Backgrounds & images

CSS gradients, background images, and colors render by default. Set pdf_print_background=false for a clean white document.

Landscape mode

Rotate to landscape with pdf_landscape=true, ideal for wide tables, timelines, or dashboards.

Fit to one page

Scale the entire HTML document to exactly one PDF page with pdf_fit_one_page=true, perfect for invoices and certificates.

Async + webhooks

With our HTML to PDF API, large documents are rendered async and delivered via signed HMAC webhook. No polling required.

Use Cases

Who uses HTML to PDF?

Any team that sends documents should be generating them programmatically.

Invoices & receipts

Render branded invoice HTML templates to PDF on demand. Pixel-perfect and ready to email or store.

Contracts & legal

Stamp dynamic data into contract templates and output consistent PDFs for every customer.

Reports & dashboards

Convert data-rich HTML reports to PDF for download, archiving, or scheduled delivery.

E-books & guides

Write in HTML/CSS, export to a clean paginated PDF. No InDesign, no LaTeX needed.

Also available

Start using our HTML to PDF API for free.

100 free conversions per month. No credit card. Full API access from day one.

Get your free API key →

FAQ

Frequently asked questions

Everything you need to know before you ship.