← Journal22 / 23

Production

What the Browser Already Sets

·7 min in full, in the book·PagePerfect Journal

Also available as a typeset book

We gave a headless Chrome 11 lines of CSS, and it produced a five-page PDF at exactly the size the file asked for, 6 by 9 in.1 Its wide inner margin changed sides from one page to the next.2 The things a browser cannot do make a short list, and the list is different in each browser.

The rest of this essay is in the book

It goes on to cover:

  • Chrome printed it, and the margins changed sides
  • Keeping lines together, browser by browser
  • Crop marks and bleed
  • Page numbers in cross-references
  • Line breaking in the browser
  • What TeX does and does not do
  • The gutter is the author’s to set
  • Proof from the engine that will make the PDF

About the book

Notes

  1. Own test, 2026: Chrome and @page, research/R4b/chrome/t.html, out.pdf; MDN browser-compat-data n.d., size (chrome 15, firefox 95, safari 18.2); page-orientation (chrome 85, firefox 122). Printed with Chrome 152.0.7977.85 in headless mode on 16 September 2026. pdfinfo reported five pages at 432 by 648 pt, which is the 6 by 9 in requested by the @page rule, and pdftotext found the margin-box text on the pages it belonged to. Evidence A: strong or direct evidence.
  2. Own test, 2026: Chrome verso and recto margins, research/R4b/chrome/t.html, out.pdf; per-page glyph extents from pdftotext -bbox. The same five-page test, with @page :left and @page :right carrying a 40 mm inner and 10 mm outer margin. Odd pages measured 119.2–404.2 pt, even pages 28.3–310.4 pt. One browser on one operating system; nothing here is a claim about Firefox or Safari. Evidence A: strong or direct evidence.

Sources

  • Own test: Chrome print-to-PDF honours @page size, margins and margin boxes, 2026-09-16.
  • MDN browser-compat-data. css/at-rules/page.json (main branch). raw.githubusercontent.com
  • Own test: Chrome print-to-PDF honours @page :left and :right margins, 2026-09-16.

Further reading