CSS属性:page-break-inside: avoid;on HTML tr元素就可以了.
经测试:
wkhtmltopdf 0.12.3提供Linux (Ubuntu Trusty) 32-bit / 64-bit built on Ubuntu 14.04.2:http:
//wkhtmltopdf.org/downloads.html#stable
快速而肮脏的测试可能如下所示:
<tr style="page-break-inside: avoid;">
<!-- A little border to see the result more easily -->
<td style="border: solid 1px blue;">
Large text possibly displayed on several pages ...
Large text possibly displayed on several pages ...
Large text possibly displayed on several pages ...
Large text possibly displayed on several pages ...
</td>
<td>col2</td>
<td>col3</td>
</tr>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5787 次 |
| 最近记录: |