Writing

Notes on making PDFs for production.

Short essays on PDF generation, document typography, react-pdf internals, and the trade-offs we make shipping tools that build other tools.

  1. Engineering8 min

    Puppeteer is too big for Vercel: the serverless PDF fix

    Chromium blows past Vercel and Lambda size limits. Here's why Puppeteer PDF endpoints fail on serverless, and how @react-pdf/renderer (~2 MB) fixes it without a headless browser.

    Read
  2. Engineering9 min

    react-pdf vs Puppeteer: an honest comparison

    When to use @react-pdf/renderer vs Puppeteer for PDFs in React and Next.js. Bundle size, layout correctness, serverless limits, and when HTML-to-PDF still wins.

    Read
  3. Engineering9 min

    Why your react-pdf table splits across pages (and the fix)

    react-pdf tears table rows in half at page breaks because it can't measure layout. Here's the wrap={false} fix, a repeating header, and a full invoice that paginates cleanly.

    Read
  4. Engineering9 min

    How to generate PDFs in React in 2026

    The definitive 2026 guide to generating PDFs in React: the three approaches, when each one is right, where they break in production, and how to fix it.

    Read
  5. Engineering7 min

    Why our PDF canvas had to become theme-immune

    Dark mode was bleeding into the PDF preview. The fix required rewriting how Tailwind dark variants propagate through a nested editor surface.

    Read
  6. Engineering8 min

    Stop using HTML-to-PDF for invoices

    Puppeteer invoices look fine until you run 10,000 of them. Here's the hidden bill, and what to do instead.

    Read
  7. Product6 min

    From Figma to PDF: the missing piece

    Designers design in Figma, developers ship in code. The translation between the two is where PDF templates go to die. Here's why, and what closes the gap.

    Read