我在HTML中遇到了分页符的问题。
我有静态以及使用html2fpdf脚本创建PDF的动态数据。当表格中的行数超过25行时,页面就会被打碎并弄乱。
如何在HTML或PHP代码中添加分页符,以便html2fpdf脚本将其视为分页符?
发布于 2012-02-06 17:52:46
html2pdf将中断它,即单个内容超出指定的页面类型(默认A4 )。我只检查了50行的内容,包括递归表等
你所能做的就是重新组织你的html代码,而不是一个包含实际内容的代码--不包含更大的内容……
例如:
<table><tr><td>content for header</td></tr></table>
<table><tr><td>content for part 1</td></tr></table>
<table><tr>
<td>first line of content</td>
--- you can have as many lines here but content of single line should not be more than A4 size
<td>1000th line of content</td>
</tr></table>
-希望这能有所帮助
https://stackoverflow.com/questions/6172949
复制相似问题