I’m facing a similar issue while generating PDFs using
Frappe’s built-in PDF generator (Headless Chrome)
The problem occurs when the item description contains too many lines. The content either overflows, overlaps, or spills into the next page, breaking the table layout.
Here’s what I’ve tried:
Used page-break-inside: avoid; on <tr> and container <div>s.
Wrapped long descriptions inside a ql-editor div like this:
Played with CSS (padding, margin-top, etc.) to control spacing and breaks.
Even tried breaking the content into smaller chunks, but Headless Chrome doesn’t properly respect page breaks within table rows
What I want to achieve:
Either the full table row should shift to the next page,
Or the content should break cleanly across pages without breaking table borders or causing layout issues.
Has anyone found a reliable solution to this with Frappe’s Headless Chrome PDF engine?
Would appreciate any tips, alternate layout suggestions, or CSS fixes that worked for you!