Search code examples
pdf-generationwkhtmltopdf

NReco PDF Generator overlapping table header when the table is split over pages


I'm using NReco PDFGenerator to create a PDF document from an HTML string. When a table is split over a page break, the table header overlaps the next row in the table (see image below).

enter image description here

Any ideas on how to fix this?


Solution

  • I found that this is fixed by adding the following css:

    thead {display: table-header-group;}
    tfoot {display: table-row-group;}
    tr {page-break-inside: avoid;}