【问题标题】:Table headers overlapping content on second page when converting to PDF with wkhtmltopdf使用 wkhtmltopdf 转换为 PDF 时,表格标题与第二页上的内容重叠
【发布时间】:2017-01-09 14:48:23
【问题描述】:

我有一个跨越多个页面的表格。该广告在第二页上重复,并与内容重叠。

我正在使用引导程序,并确保在我的页面中实现了来自其他 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;
}

【问题讨论】:

    标签: twitter-bootstrap-3 wkhtmltopdf


    【解决方案1】:

    表格被包裹在<div class="table-responsive"> 中。这是导致问题的原因。

    我添加了以下 CSS 来更改在表格响应 div 上处理溢出 x 的方式

    .table-responsive { overflow-x: visible !important; }
    

    这解决了我的问题。

    基思

    【讨论】:

    • Yaba DAI NE NALA IRUDA:谢谢你..你拯救了我的一天
    猜你喜欢
    • 2018-11-03
    • 2020-10-28
    • 2015-10-06
    • 1970-01-01
    • 2021-06-09
    • 1970-01-01
    • 1970-01-01
    • 2017-01-05
    • 1970-01-01
    相关资源
    最近更新 更多