Page break on <tr>
When adding 'tr style="page-break-after: always !important;" ' nothing happens, where 'tr' is the html tag. Is there any way to force a page break in a table on a specific table row without setting it's style="display: block" or style="display: inline-block"? Changing the display property, the page break works but then i'm finding it impossible to correct the styling of the entire table.
this is working for me:
<td>
<div class="avoid">
Cell content.
</div>
</td>
...
<style type="text/css">
.avoid {
page-break-inside: avoid !important;
margin: 4px 0 4px 0; /* to keep the page break from cutting too close to the text in the div */
}
</style>
https://stackoverflow.com/questions/9288802/avoid-page-break-inside-row-of-table
Hi, post is older i know, but i was struggeling with this too. I solved it when i removed the bootstrap class "table-responsive". This was the error for me.
I'm having the same issue and the stackoverflow suggestions are not working. The suggestions work fine when printing from all browsers I've tried, but they don't work with this package.
In my case I print <table> for every row, but it's ugly solution.
@GvadimI Do you have an example that you could share?
In my case I print
<table>for every row, but it's ugly solution.
It works for me too