我有这样的代码:HTML2PDF页编号
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($html);
$html2pdf->Output();
如何在文档的底部添加页码?
我有这样的代码:HTML2PDF页编号
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($html);
$html2pdf->Output();
如何在文档的底部添加页码?
我仍然在寻找它...我刚才找到了解决办法: 在你的模板,就像插入一个代码:
<page>
<page_footer>
[[page_cu]]/[[page_nb]]
</page_footer>
</page>
完整的示例在这里:http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:bookmark
查看http://www.tufat.com/docs/html2ps/calling.html并查看footerhtml
参数。
另请参阅http://www.tufat.com/docs/html2ps/directives.html以了解您可以使用的指令。
希望这点能指引您朝着正确的方向发展。
我试着下面的代码。
<page>
<page_header footer='page'>
<!-- some text-->
</page_header>
<!--
Content
-->
<page_footer>
</page_footer>
</page>
现在在页脚中我得到页码以下列方式
第1/3页 第2/3页 3/3页
每一页,但我没有有任何自定义格式。如果有人知道请告诉。
我也跟着链接:期权的类型你想要的网页上德页面上http://wiki.spipu.net/doku.php?id=html2pdf%3aen%3av4%3apage
您的意思是说,整个html内容就像上面的代码片段一样?它不适用于我:( – 2017-07-29 19:35:41
<page backtop="7mm" backbottom="7mm" footer="page">
<page_header>
<!-- some text-->
</page_header>
<!--
Content
-->
<page_footer>
</page_footer>
实例。 Diferents的选项是:(页,日期,heure,表单),用“;”分隔
此外,您还必须指明页眉和页脚的大小。
另一件可以派上用场的分页是如何重置不同页面的编号!也许你想添加多个文件到同一pdf并打印出来。你可以在页面标签上使用`pagegroup =“new”`。 – aki 2014-09-01 07:32:51
感谢您的支持 – 2017-04-12 14:25:08