Python module xhtml2pdf - pages count outside footer

Viewed 239

I use the xhtml2pdf module to generate a PDF document and I want to use the pdf:pagecount tag in a normal text, i.e. outside the footer.

When I use the footer_content class for the div element with the pdf:pagecount tag, the page number and page count is properly generated.

<div id="footer_content">Page <pdf:pagenumber> of <pdf:pagecount>
</div>

However, when I do not use the footer_content class, the pdf:pagenumber tag prints 0 for all pages and the tag pdf:pagecount does not print anything at all.

enter image description here

<div>Page <pdf:pagenumber>
    of <pdf:pagecount>
</div>

enter image description here

Is there some solution how to use the pdf:pagecount tag outside the footer_content class?

0 Answers
Related