PDF Printing with large text in a table cell spilling into th

356 views Asked by At

I have a pdf report generated using wkhtmltopdf. Part of it is a table with a HTML comments which could get as long as 3 pages. I already have the below CSS to avoid any table row or table cell having a page-break inside, which works well for smaller rows. However, in case of the row with large comment, the cell spans across multiple pages and spilling into the table header on the next page.

How can I make the overflown text sit inside the cell instead of overlapping the header on the next page?

thead {
    display: table-header-group;
}

tfoot {
    display: table-row-group;
}

tr, td, th, .dont-break {
    page-break-inside: avoid !important;
}

enter image description here

0

There are 0 answers