Public API documentation, executable examples, and comparison materials for the gPdf PDF rendering service.
gPdf turns a JSON
DocumentRequestinto a PDF document at the edge in 3–5 ms. Rust + WebAssembly running on Cloudflare Workers. No browser, no cold start, no document persistence.
- 🌐 Service — gpdf.com
- 💵 Pricing — $5 / month for 100K pages (Basic tier); free trial 100 pages / day
- 📰 Blog — gpdf.com/blog
- 🛠 Changelog — gpdf.com/changelog · also mirrored in CHANGELOG.md
- 🛡 Status — gpdf.com/status
curl -X POST "https://api.gpdf.com/api/v1/pdf/render" \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d @examples/invoice.json \
-o invoice.pdfSee examples/ for ready-to-run JSON payloads.
| Doc | Endpoint | When to use |
|---|---|---|
| API Reference | POST /api/v1/pdf/render |
Full DocumentRequest with pages, elements, coordinates, tables. Use when you need pixel-level control. |
| Template API | POST /api/v1/template-render |
template_id + data array. Use when you have a published template and only business data changes per call. |
| E-Invoice API | POST /api/v1/e-invoice/render |
Factur-X / ZUGFeRD hybrid invoices: PDF/A-3 with embedded EN 16931 XML. For EU e-invoicing mandate compliance. |
| Template Authoring | — | Author reusable templates that bind business data. |
- Render latency (p50): 3 ms for a 1-page A4 invoice (median across 1K invocations on a Cloudflare Workers isolate).
- Pricing: $5 / month for 100,000 pages (Basic); equivalent to $0.00005 per page.
- PDF/A profiles: PDF/A-1b · 2b · 3b · 4 selectable per request.
- In-memory document lifetime: ~4 ms. Stateless: the buffer exists only inside one V8 isolate for the request, then is freed. No persistence, no document store.
Performance + capability head-to-heads against other PDF tools:
- gPdf vs Puppeteer — headless Chromium vs edge-native WASM
- More comparisons coming (DocRaptor, PDFShift, Anvil, Prince, wkhtmltopdf, PDFKit, ReportLab).
- Layout:
pages[],elements[], x/y in millimetres,x_anchorfor content_right alignment. - Text: paragraph, list, page_break blocks. Variables resolved post-layout:
page,total_pages. - Tables: row-span across pages, repeating headers, alternate fill, double-line borders.
- Stack/block: invoice-tail subtotal/total blocks that follow a paginated table.
- Layers: background, watermark (algorithmic tiled), and stamp (last-page approval marks).
- Barcodes: 30+ vector symbologies — QR, GS1-128, PDF417, DataMatrix, Aztec, MaxiCode, ITF-14, SSCC-18, UPS S10, Code 128 family, EAN/UPC family.
- CJK: NotoSans CJK embedded with automatic fallback. No OS-level font install required.
- PDF/A: 1b · 2b · 3b · 4 · UA-1 selectable per request.
- E-invoice: Factur-X / ZUGFeRD attachment streams ride on PDF/A-3. Aligns with EN 16931 mandates rolling across the EU through 2026 and 2027.
- Output: binary (
Content-Disposition: inline) or file (Content-Disposition: attachment).
Inside Cloudflare Workers V8 isolates. No Chromium container, no Lambda warming, no document persistence after the request. Same input renders to a byte-identical PDF across isolates.
This repo is the public documentation surface of gPdf:
- ✅ API contract (request shapes, error codes, limits)
- ✅ Executable JSON examples
- ✅ Performance comparisons
- ✅ Changelog mirror
The gPdf rendering engine source code is not public. The marketing-site source (Astro app, blog, hreflang infrastructure) is also kept private. This repository contains the public-facing API contract and integration material only.
See CONTRIBUTING.md for issue + PR guidelines.
Documentation content licensed under MIT.