diff --git a/src/app/globals.css b/src/app/globals.css index b3477271..fb7f520e 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -128,20 +128,24 @@ PAGE LAYOUT --------------------------------- */ + /* Real A4 portrait with proper margins — the report is designed to this + width, so it never renders landscape/oversized. */ @page { - margin: 0; + size: A4 portrait; + margin: 12mm; } - /* Outer page padding (NOT scaled) */ + /* Margins come from @page now; no extra padding, and NO transform scale + (a scaled root paginates badly — it was pushing whole blocks to page 2 + and leaving the first page half-empty). */ .print-page { - padding: 20px 24px; + padding: 0; + max-width: none; } - /* Inner content (scaled slightly) */ .print-root { - transform: scale(0.94); - transform-origin: top left; - width: 106.4%; /* 1 / 0.94 */ + width: 100%; + transform: none; } /* Keep every colour (EPC chips, ledger bars, tints) when printing — diff --git a/src/app/portfolio/[slug]/(portfolio)/reporting/pdf/page.tsx b/src/app/portfolio/[slug]/(portfolio)/reporting/pdf/page.tsx index df6a22ed..00ce4ec1 100644 --- a/src/app/portfolio/[slug]/(portfolio)/reporting/pdf/page.tsx +++ b/src/app/portfolio/[slug]/(portfolio)/reporting/pdf/page.tsx @@ -264,8 +264,8 @@ export default async function ReportingPdfPage(props: { if (segment === null) { const belowC = countBelowBand(bandCounts, "C"); return ( -
-
+
+
@@ -389,8 +389,8 @@ export default async function ReportingPdfPage(props: { }); return ( -
-
+
+