▍ humdrum codex / soft

Edition: render US Letter, not A4 (fixes duplex back-page clip)

d30b97c47f25b20e12d6980d109c320ea246b94b
humdrum-tiv <45084903+humdrum-tiv@users.noreply.github.com> · 2026-06-08 15:55

parent 5f86dbd9

Edition: render US Letter, not A4 (fixes duplex back-page clip)

A4 is 18mm taller than Letter; printing the A4 edition on Letter paper shifted
the back page on duplex and clipped its top. Render letter to match the paper.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

2 files changed

app/globals.css +1 −1
@@ -235,5 +235,5 @@ @media print {
   nav, [role="status"], nextjs-portal { display: none !important; }
   html, body { background: #fff !important; }
   .paper { padding: 0; max-width: none; }
-  @page { margin: 16mm 14mm; }
+  @page { size: Letter; margin: 16mm 14mm; }
 }
lib/pdf.ts +1 −1
@@ -31,7 +31,7 @@     const page = await browser.newPage();
     await page.goto(`${BASE_URL}/print`, { waitUntil: "networkidle0", timeout: 45_000 });
     await page.pdf({
       path: pdfPath,
-      format: "A4",
+      format: "letter", // match US Letter paper — A4 is taller and clips on duplex
       printBackground: true,
       preferCSSPageSize: true,
     });