M

Mikel Rougstone

Founder, PDFGeny

I build and run PDFGeny — the API, the rendering fleet and the template catalog. Most of what I write here comes from something that broke in production first.

15 posts

Writing HTML templates for PDF: a style guide (Jinja, Django, Handlebars)
Guides

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Issuing 5,000 course certificates in one afternoon
Tutorials

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Generating receipts at checkout without slowing the checkout
Tutorials

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.

MMikel Rougstone · 31 Aug 2026 · 3 min
URL-to-PDF and SSRF: how a PDF renderer becomes an attack surface
Engineering

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Why the PDF from headless Chromium differs from Print to PDF in the browser
Engineering

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.

MMikel Rougstone · 31 Aug 2026 · 3 min
What an invoice PDF must contain: the fields tax authorities actually check
Guides

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Migrating off wkhtmltopdf: a checklist that avoids the surprises
Guides

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.

MMikel Rougstone · 31 Aug 2026 · 4 min
PDF/A from HTML: what it is, when you need it, how to produce it
Guides

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.

MMikel Rougstone · 31 Aug 2026 · 3 min
PDF generation in Node.js without running Puppeteer yourself
Tutorials

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Generate PDF invoices from Python in 20 lines
Tutorials

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 …

MMikel Rougstone · 31 Aug 2026 · 3 min
Web fonts in generated PDFs: why they fall back, and how to make them load
Guides

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.

MMikel Rougstone · 31 Aug 2026 · 4 min
Page breaks in HTML to PDF: the CSS that actually works
Guides

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 …

MMikel Rougstone · 31 Aug 2026 · 4 min