PDF generation, without the folklore
Measured comparisons, working code and the failure modes nobody documents. 30 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.
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 …
How to generate 10,000 PDFs without running out of memory
Bulk PDF generation fails in predictable ways: one browser per document, unbounded concurrency, results held in RAM. Here is the shape of a pipeline …
Convert HTML to PDF: six methods, and how each one breaks
Browser print dialog, wkhtmltopdf, WeasyPrint, Puppeteer/Playwright, LibreOffice, and a hosted API. What each produces, what it costs to run, and the failure you will …