puppeteer: [Bug]: Page break within table doesn't work
Bug description
Steps to reproduce the problem:
- I had a very simple html table. I have tried using
break-inside: avoid
in all the td , tr , table tags but the table appears to be cut in the middle in the exported pdfs
Puppeteer version
13.0.1
Node.js version
14.19.1
npm version
8.14.16
What operating system are you seeing the problem on?
macOS
Relevant log output
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18
Unfortunately, we need a complete repro (HTML/CSS/JS files of the page + a Puppeteer script) with a minimal example reproducing the issue. The issue is likely in the browser implementation (as Puppeteer just asks the browser for PDFs) so we will need the repro to file the bug upstream at crbug.com. We don’t have capacity to reverse engineer the React snippets to get a working repro. If you could provide the repro, it’d be great.
@OrKoN I have a lot of fields in the page that i’m printing.
I’m actually printing a view with a lot of fields. It has display:flex in the parent.
Here are my failed attempts to fix the page break:
Script to print the pdf:
Output:
What i need to achieve:
@sayo96 could you please share the HTML table you had used and the script you used to print to PDF?