Description:
Hi Team,
We are using ERPNext Version 15 and facing a layout inconsistency issue in Print Format.
In the Print Preview, the document layout appears correct. Up to 4 item rows fit properly on a single page as per our design.
However, when we download the same document as PDF, the layout changes. The content shifts and moves to the second page, even though it fits correctly in the preview.
We have already optimized the design to fit the maximum number of lines on a single page. The issue occurs only in the downloaded PDF output.
Environment Details:
-
ERPNext Version: 15
-
Print Format Type: (Standard / Custom HTML – please specify)
-
Hosting: (Frappe Cloud / Self-hosted – please specify)
-
No recent major structural changes
Issue Observed:
-
Print Preview → Layout correct
-
Downloaded PDF → Different page break and spacing
-
Same Print Format used
It seems like the PDF rendering engine behaves differently from the browser preview.
Queries:
-
Why does the PDF output differ from Print Preview in ERPNext 15?
-
Is this related to the PDF rendering engine (wkhtmltopdf)?
-
Is there any recommended CSS approach (page-break rules, margins, scaling) to maintain consistent layout?
-
Any best practices to ensure identical preview and PDF formatting?
Screenshots attached for reference.
Any guidance would be appreciated.