Table Page Break Question
When generating a pdf where I have a long table on the left and a small div to the right, the breaking of the table works fine along with repeating the captions. The issue that I am having is that instead of filling out the current page with as much of the table as it can along with the div(the div will fit on the current page), it does a page break before and then displays the table and the div on the next page as you can see in the picture below. If i take out the div, it seems to work fine. Is there a way that I can prevent this from happening?
Thanks
Eric
- report page 1.png 140.9 kB
- report page 2.png 197.3 kB
Applying certain CSS properties can cause this, including the 'page-break-inside' and 'height' properties. What style rules are you applying to the div and the table? Is the table or div floated?
I am not using height properties. I am currently using prince-linebreak-magic: auto; on the body, but removing this still causes the issue. I have also tried the 'page-break-inside' with different issues.
Here is a simplified version of what I am doing which is still causing the page break to happen.
<div>
<div style="float:left">
<table>
</table>
</div>
<div style="float:left">
</div>
</div>
Breaking floats across multiple pages is not recommended if you can avoid it. How about Making the second div float right, and not floating the first div? Or placing both divs inside a table with two columns, instead of using float?
Thank you so much.
I removed all floats and added it to a table and it is working perfect.