Twitter bootstrap dompdf引导表的第一个值显示在第二列中
我使用Dompdf将表格报告导出为PDF,表格在HTML中的外观如下(示例如下):Twitter bootstrap dompdf引导表的第一个值显示在第二列中,twitter-bootstrap,dompdf,bootstrap-table,Twitter Bootstrap,Dompdf,Bootstrap Table,我使用Dompdf将表格报告导出为PDF,表格在HTML中的外观如下(示例如下): 名字 姓氏 电子邮件 约翰 雌鹿 john@example.com 玛丽 教育部 mary@example.com 七月 杜利 july@example.com 问题是,当导出为PDF时,表格的第一个值会偏移到第二列。。。像这样: <tbody> <tr> <td></td> {#NOTHING HERE#} <
名字
姓氏
电子邮件
约翰
雌鹿
john@example.com
玛丽
教育部
mary@example.com
七月
杜利
july@example.com
问题是,当导出为PDF时,表格的第一个值会偏移到第二列。。。像这样:
<tbody>
<tr>
<td></td> {#NOTHING HERE#}
<td>John</td>
<td>Doe</td>
</tr>
<tr>
<td>john@example.com</td>{#Now everything is offset#}
<td>Mary</td>
<td>Moe</td>
</tr>
<tr>
<td>mary@example.com</td>
<td>July</td>
<td>Dooley</td>
</tr>
<td>july@example.com</td>{#And this goes outside the table#}
</tbody>
{这里什么都没有}
约翰
雌鹿
john@example.com{现在一切都被抵消了}
玛丽
教育部
mary@example.com
七月
杜利
july@example.com{#这超出了桌子的范围}
dompdf版本是0.7。x@beta
我甚至尝试将带有divs的表转换为divs
,但它输出了另一个错误
为什么会这样???如何修复它?这是0.7.0之前的dompdf版本中的一个错误,请参阅。若要删除一些空白,请尝试:
thead:before, thead:after { display: none; }
tbody:before, tbody:after { display: none; }
实际上,我正在尝试使用
0.7。x@beta
它不起作用:(这使表格看起来正常。仅供参考,0.7.0 final即将发布。它包括此问题的修复程序。
thead:before, thead:after { display: none; }
tbody:before, tbody:after { display: none; }