Invoices & statements
Render a per-customer HTML invoice to a print-fidelity PDF for email delivery and tax archiving.
- POST /v1/convert
- options.page_size: "A4"
- wait_for_network_idle
/ Use cases
A non-exhaustive list of workloads 21pdf is actually good at — plus the primitives each one relies on, so you can evaluate fit before touching curl.
Render a per-customer HTML invoice to a print-fidelity PDF for email delivery and tax archiving.
Order-confirmation receipts rendered from the same HTML template your email client shows.
Compact A6/Letter labels with barcodes — CSS controls dimensions, Chromium renders the barcode font.
Periodic reports from an internal dashboard URL. SSRF-checked fetch keeps the renderer off your metadata endpoints.
Templated HTML → PDF with headers/footers rendered in the same CSS you use on screen.
Dashboards to PDF for offline review — the URL path integrates cleanly with your existing auth proxy.
Rendered from a trusted internal URL. PDFs stored in MinIO with SSE-S3 + retention limits.
Per-student HTML → PDF. Variants via CSS class swaps, rendered by the same Chromium instance as screen.
Publish HTML → render to PDF for the gated download. Fresh content on every fetch, cached per request.
Best when the source is in your service (an invoice templated from DB rows). Avoids a cross-service URL fetch — lowest latency.
{
"html": "<!doctype html><body><h1>Invoice 2041</h1>...",
"options": {
"page_size": "A4",
"margin_top": 18, "margin_bottom": 18,
"margin_left": 15, "margin_right": 15,
"wait_for_network_idle": true
}
} Best when the document is already a page on an internal dashboard. SSRF is checked twice: at the HTTP boundary and inside Chromium.
{
"url": "https://reports.internal/quarterly/2026-q1",
"options": {
"page_size": "Letter",
"orientation": "landscape",
"wait_for_network_idle": true
}
} Tell us what you need. We'd rather say "not yet" than fabricate a roadmap.
Contact us → Read the docs