PhantomJS seems to have issues with trying to make the table headers repeat on page breaks; the headers are sometimes in the wrong place, or they collide with existing content. I'm wondering if there is a way to disable table-header repeating on page-breaks, so that I can avoid this problem entirely?
This can be done setting a CSS property for the thead element of the html table. The property that needs to be set is: display: table-header-group. The following html table will repeat the table header at the top of each pdf page when converted to pdf.
This is a tricky, But i solved it using simple logic. Cast table element to display as a Block element and it works.
display:block;
page-break-inside:avoid;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With