问题
I have a table that is spanning across multiple pages. The thead is being repeated on the second page and is overlapping the content.
I am using bootstrap and have ensured the css from other wkhtmltopdf overlap solutions are implemented in my page.
thead { display: table-header-group; }
tfoot { display: table-row-group; }
tr { page-break-inside: avoid; }
table, tr, td, th, tbody, thead, tfoot, td div {
page-break-inside: avoid !important;
}
回答1:
The table was wrapped in a <div class="table-responsive">
. This was causing the issue.
I added the following CSS to change how overflow-x was handled on the table-responsive div
.table-responsive { overflow-x: visible !important; }
This fixed my issue.
Keith
来源:https://stackoverflow.com/questions/39276254/table-headers-overlapping-content-on-second-page-when-converting-to-pdf-with-wkh