我在HTML中面临分页问题。
我有使用html2fpdf脚本创建PDF的静态和动态数据。当我在表中有超过25行时,页面会中断并搞砸了。
如何将分页符放在我的HTML或PHP代码中,以便html2fpdf脚本将其视为分页符?
答案 0 :(得分:1)
html2pdf将中断 - 单个内容超出指定的页面类型(默认A4).. 我只检查过例如内容包含50行,包括递归表等
你可以做的是重构你的html代码,而不是一个包含实际内容的代码 - 没有更大的内容......
e.g。
<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>
---希望这有帮助