Guides
Tested fixes for the problems developers hit when generating PDFs with Puppeteer and headless Chrome.
- Puppeteer PDFs on Vercel: a working setup, the limits that bite, and why your fonts change
Generate PDFs from a Next.js route on Vercel with @sparticuz/chromium: the fix for the missing bin folder error, measured cold starts, size limits and font fixes.
- Page numbers in Puppeteer PDFs: footerTemplate gotchas and the CSS @page alternative
Why your Puppeteer footer is invisible or overlaps the content, how to fix it, and how Chrome 131+ lets you put 'Page 1 of 4' in plain CSS instead.
- Puppeteer PDF tables: repeat the header on every page and stop rows splitting
Chrome already repeats <thead> on every printed page. One CSS line stops rows splitting across pages. Here are the markup mistakes that make headers vanish, all tested.
Don't want to run Chrome yourself? We're building a small HTML-to-PDF API with these fixes on by default.