PDF generation, without the folklore
Measured comparisons, working code and the failure modes nobody documents. 15 posts, written by the person who runs the rendering fleet.
WeasyPrint vs Playwright for HTML to PDF: real timings and when each wins
We rendered the same invoices, reports and web pages with WeasyPrint and headless Chromium via Playwright. Cold and warm timings, memory, and the cases where one is simply the wrong tool.
Writing HTML templates for PDF: a style guide (Jinja, Django, Handlebars)
Templates that render well as PDFs follow a few rules: fixed page geometry, no external state, defensive filters, print CSS. Examples in Jinja and …
Issuing 5,000 course certificates in one afternoon
A spreadsheet of names, one landscape template, batch requests of 100, and signed links per student. The full workflow including naming, verification codes and …
Generating receipts at checkout without slowing the checkout
The receipt PDF should never sit between the customer and the order confirmation. A pattern: confirm first, render asynchronously, attach when ready.
URL-to-PDF and SSRF: how a PDF renderer becomes an attack surface
A renderer that fetches URLs can be pointed at your internal network. The attacks, the defences, and what to demand from a PDF API …
Why the PDF from headless Chromium differs from Print to PDF in the browser
Same engine, different output: viewport, print media, backgrounds, default margins, headless font rendering. A list of the differences and the option that fixes each.
What an invoice PDF must contain: the fields tax authorities actually check
The eleven fields present on a compliant invoice in the EU, UK and US, the ones people forget, and how to bake them into …
Migrating off wkhtmltopdf: a checklist that avoids the surprises
A practical sequence for replacing wkhtmltopdf in a production system: inventory, flag mapping, visual diff, cutover, rollback.
PDF/A from HTML: what it is, when you need it, how to produce it
Auditors, registries and archives ask for PDF/A. What the standard requires, why an ordinary browser PDF fails it, and how to convert.
PDF generation in Node.js without running Puppeteer yourself
Puppeteer works until it ships to a 512 MB container. Here is the same result — HTML in, PDF out — from Node with …
Generate PDF invoices from Python in 20 lines
A complete, working example: invoice data as a dict, a template, one API call, a PDF on disk. Then the same thing for a …
Web fonts in generated PDFs: why they fall back, and how to make them load
The PDF shows Times where the page showed your brand font. Causes — timing, CORS, formats, licensing — and the fix for each.
Page breaks in HTML to PDF: the CSS that actually works
Rows split across pages, headings orphaned at the bottom, cards cut in half. The four CSS properties that fix it in Chromium-based renderers, with …