开发者

html2pdf page numbering

开发者 https://www.devze.com 2023-03-13 12:58 出处:网络
I have code like this: $html2pdf = new HTML2PDF(\'P\',\'A4\',\'en\'); $html2pdf->WriteHTML($h开发者_高级运维tml);

I have code like this:

$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($h开发者_高级运维tml);
$html2pdf->Output();

How add page number at the bottom of the document?


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


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


<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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消