问题
I have code like this:
$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($html);
$html2pdf->Output();
How add page number at the bottom of the document?
回答1:
i'm still looking for it ... and i have just found the solution : in your template, insert a code like :
<page>
<page_footer>
[[page_cu]]/[[page_nb]]
</page_footer>
</page>
complete sample here : http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:bookmark
回答2:
I tried the following code.
<page>
<page_header footer='page'>
<!-- some text-->
</page_header>
<!--
Content
-->
<page_footer>
</page_footer>
</page>
Now in each page in footer I am getting PAGE NUMBER IN THE FOLLOWING MANNER
Page 1/3 Page 2/3 Page 3/3
But i have not got any custom format. If any body know please tell.
I have followed the link : http://wiki.spipu.net/doku.php?id=html2pdf%3aen%3av4%3apage
回答3:
<page backtop="7mm" backbottom="7mm" footer="page">
<page_header>
<!-- some text-->
</page_header>
<!--
Content
-->
<page_footer>
</page_footer>
Instance on de page which type of option do you want on the page. Diferents options are : (page, date, heure, form), separated by “;”
Also you have to indicate the size of the header and the footer.
回答4:
Have a look at http://www.tufat.com/docs/html2ps/calling.html and look at the footerhtml
parameter.
Also see http://www.tufat.com/docs/html2ps/directives.html for directives you can use.
Hope this points you in the right direction.
来源:https://stackoverflow.com/questions/6386599/html2pdf-page-numbering