Html2pdf pagination

I have a code like this:

$html2pdf = new HTML2PDF('P','A4','en');
$html2pdf->WriteHTML($html);
$html2pdf->Output();

How to add page number at the bottom of the document?

+5
source share
4 answers

I'm still looking for it ... and I just found a solution: in your template, paste code like:

<page>
  <page_footer>
    [[page_cu]]/[[page_nb]]
  </page_footer>
</page>

full sample here: http://wiki.spipu.net/doku.php?id=html2pdf:en:v4:bookmark

+11
source

I tried the following code.

<page>
    <page_header footer='page'>
        <!-- some text-->
    </page_header>
    <!--
        Content
     -->
    <page_footer>
    </page_footer>
</page>

Now on each page of the footer I get the PAGE NUMBER IN THE NEXT MANNER

Page 1/3 Page 2/3 Page 3/3

But I do not have a special format. If any authority knows, please advise.

: http://wiki.spipu.net/doku.php?id=html2pdf%3aen%3av4%3apage

0
<page backtop="7mm" backbottom="7mm" footer="page">
<page_header>
    <!-- some text-->
</page_header>
<!--
    Content
 -->
<page_footer>
</page_footer>

, . : (, , , ), ";"

You must also specify the size of the header and footer.

0
source

Take a look at http://www.tufat.com/docs/html2ps/calling.html and look at the parameter footerhtml.

Also see http://www.tufat.com/docs/html2ps/directives.html for directives you can use.

Hope this indicates that you are in the right direction.

-1
source

All Articles