Atelier
Editorial invoice with measured line-item pagination, carried-forward totals, and a payment QR block.
- Measured table pagination
- Carried-forward totals
- Local fonts and fixed slots
A curated set of eight complete HTML-to-PDF examples, each with a Nunjucks template, data payloads, an independent test case, a render script, generated PDFs, previews, and its own documentation.
The collection covers the document types that usually break in production: long invoices, contract packets, fillable forms, exact-size shipping labels, and accessible annual reports. Every example installs and renders on its own against the Fork PDF API, and the full source is on GitLab under the MIT license.
Clone the repository and render any example with your Fork PDF API key and project ID.
git clone https://gitlab.com/fork-pdf/examples.git
cd examples/invoices/freelance/01-atelier
npm install
cp .env.example .env
# Add FORKPDF_API_KEY and FORKPDF_PROJECT_ID to .env
set -a && . ./.env && set +a
npm run render
Each example follows the same pattern. To verify every example without rendering PDFs or consuming API credits, run npm run examples:verify at the repository root.
Four invoice layouts, each built around a different billing model and a measured pagination problem.
Editorial invoice with measured line-item pagination, carried-forward totals, and a payment QR block.
Retainer drawdown and time-entry billing with a bold signal-orange grid and a compact summary.
Usage billing with credits, VAT, and paid, due, and overdue states in one template.
Schedule of values, retainage, change orders, and a certification page for progress billing.
Four more document families that test pagination, AcroForm fields, exact physical dimensions, and accessibility metadata.
NDA, MSA, and SOW in one packet with measured prose pagination, a TOC, an execution page, and signature geometry.
Native AcroForm controls generated from HTML, with 73 mapped fields, a signature overlay, and field-map JSON.
Exact 100 × 150 mm output with a locally generated Code 128 barcode and scanner quiet-zone validation.
Annual report with PDF/A-4 and PDF/UA-2 output, charts, TOC targets, and 15 tagged tables.
HTML-to-PDF rendering is table stakes. These examples focus on the problems that actually break production documents:
testResults — no data.pb parsing required..pb files are committed. Credentials come from FORKPDF_API_KEY and FORKPDF_PROJECT_ID in your environment.
Hosted walkthrough These API-focused tutorials live on forkpdf.com and pair well with the repository examples:
Every example includes its own README, render script, test case, and generated output. GitLab remains the source of truth as the collection grows.
Open the Fork PDF examples on GitLab ↗