PRODUCT / GENERATION & CONVERSION

HTML to PDF API

Convert HTML to production PDFs with Chromium via POST /v1/pdf. Real CSS, webfonts, and print options with no browser process on your machine.

Read the implementation guide
DOCUMENT / 001PDF · A4
a.Acme StudioDesign with intention.

Invoice

INV—2026—042
September 07, 2026
Northstar Labs

120 Market Street
San Francisco, CA 94103

Due September 21, 2026
USD · Bank transfer

DESCRIPTIONQTYAMOUNT
Brand identity system1$2,400.00
Website design1$4,800.00
Development handoff1$1,200.00
Subtotal$8,400.00
Tax (0%)$0.00
Total due$8,400.00
Thank you for building with us.01 / 01
templateData{ "total": 8400 }
invoice.pdfSample output · ready to inspect
HTML + DATAPRODUCTION PDF

Use this page when you already have HTML and need a production PDF. POST /v1/pdf with html. Real CSS, webfonts, and print options — no browser process on your machine. Office files go to POST /v1/convert; merging existing PDFs is POST /v1/pdf/merge. Send html as a UTF-8 JSON string — not Base64. Optional filename, response mode, and Chromium print options.

Input

Send exactly one source field. For this route: html is the direct path.

  • • `html` string body
  • • Optional `filename` ending in .pdf
  • • `response`: binary (default), url, or async
  • • Optional `callbackUrl` for job completion

Controls

Set format, margins, page ranges, header/footer templates, and network wait behavior.

  • • format: letter, legal, tabloid, ledger, a0-a6
  • • waitUntil: load, domcontentloaded, networkidle0, networkidle2
  • • timeout max: 60000ms

curl

Binary response writes straight to file.

POST /v1/pdf
curl https://api.relaypdf.com/v1/pdf \
  -H "Authorization: Bearer pdf_live_..." \
  -H "Content-Type: application/json" \
  -d '{"html":"<h1>Invoice 1042</h1>","filename":"invoice.pdf"}' \
  --output invoice.pdf