SnapHTML API

HTML to PDF API

Convert URL or HTML payloads to PDF with one POST request. Ideal for invoices, reports, webpage snapshots, and automation workflows.

Supports both URL and HTML inputs
Built for invoices, reports, archives, and exports
Scales into async jobs and webhooks

Endpoint

POST /api/pdf

URL to PDF

curl -X POST "https://snaphtml.one/api/pdf" \
  -H "content-type: application/json" \
  -d '{"url":"https://example.com"}' \
  --output out.pdf

HTML String to PDF

curl -X POST "https://snaphtml.one/api/pdf" \
  -H "content-type: application/json" \
  -d '{"html":"<!doctype html><html><body><h1>Hello</h1></body></html>"}' \
  --output out.pdf

Request Fields

  • url: Target webpage URL (http/https)
  • html: Raw HTML string (choose url or html)
  • format: A4 / A3 / Letter / Legal
  • header / footer: Header and footer text with alignment
  • logo: Logo dataUrl, position, and size

High-volume and enterprise use cases

If you need batch processing, async jobs, callback delivery, or more advanced rendering controls, leave your use case here.

Need Bulk HTML to PDF at Scale?

Talk with us for bulk html to pdf, html string to pdf api, url to pdf batch jobs, and enterprise rendering workflows.

bulk html to pdfhtml string to pdf apibatch url to pdfinvoice html to pdf

HTML to PDF API for production pipelines

Use one endpoint to convert URL or HTML into print-ready PDF. This page targets API-first buyers and implementation intent.

Stable Output

Control page size, margins, and header/footer for repeatable exports.

Async-friendly

Combine with webhooks and queue workers for large rendering batches.

Developer Adoption

Pair docs, examples, and SDK snippets to reduce integration time.

SSS

Does the API support URL and HTML string input?

Yes, both input modes are supported in the same API.

Can I add custom header/footer text?

Yes, header and footer options are supported for PDF output.

What related pages should link here?

Link from html-to-pdf, url-to-pdf, and scenario pages like invoice/report.

Ilgili sayfalar

HTML to PDF API - Developer Docs