我有一个跨越多个页面的表格。该广告在第二页上重复出现并与内容重叠。
我正在使用 bootstrap 并确保在我的页面中实现了来自其他 wkhtmltopdf 重叠解决方案的 css。
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;
}
最佳答案
表格被包裹在 <div class="table-responsive">
中.这是导致问题的原因。
我添加了以下 CSS 来更改 overflow-x 在表响应 div 上的处理方式
.table-responsive { overflow-x: visible !important; }
这解决了我的问题。
基思
关于twitter-bootstrap-3 - 使用 wkhtmltopdf 转换为 PDF 时,表格标题与第二页上的内容重叠,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39276254/