I wanted page.pdf() to produce a report with a page-number footer, a coloured banner and A4 pages. Four things behaved differently from what I expected, so I measured each one. I read the PDFs back with pdf.js, which gives text size, position, fill colours and page size, so nothing below was judged by eye.
The short version:
Without printBackground: true the background colour is dropped. White text on it stays, on a white page.
A header or footer template without a font-size is drawn at about 0.7 pt. The text is in the PDF and nobody can read it.
A CSS @page { size } is ignored unless preferCSSPageSize: true , but its orientation is not. A landscape @page turned my format: 'A4' into a landscape page.
break-inside: avoid stops cards from splitting across pages. A <thead> repeats on every page, a plain <tr> header does not.
Setup
Playwright 1.63.0 (Chromium 153.0.8010.12), pdfjs-dist 6.5.438, Node v24.22.2, Linux, 2026-11-06.…