question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pdf:pagenumber and pdf:pagecount tag issues

See original GitHub issue

I have strange issues with the above tags inside html templates.

Let’s say I have <div id="footer_pagenumber">Page <pdf:pagenumber/></div> then the page number is printed twice (11 instead of 1). If I add a single whitespace after the <pdf:pagenumber/> tag, the number is fine. The same problem applies to <pdf:pagecount/>.

Another issue is with <pdf:pagecount/> is that if I use this tag, the background image of my PDF is not rendered anymore.

Tested with xhtml2pdf v0.0.5, reportlab 2.7 and Pillow 2.0.0.

Issue Analytics

  • State:open
  • Created 10 years ago
  • Comments:17 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
pavlixcommented, Jan 27, 2016

I also experience it but I found a workaround. It was good enough to put one space just after the tag, i.e. change --<pdf:pagenumber>-- to --<pdf:pagenumber> -- (double hypen is there to make the space visible).

3reactions
w-commented, Mar 20, 2016

+11

Read more comments on GitHub >

github_iconTop Results From Across the Web

pdf:pagenumber and pdf:pagecount tag issues - Bountysource
I have strange issues with the above tags inside html templates. Let's say I have <div id="footer_pagenumber">Page <pdf:pagenumber/></div> ...
Read more >
Working with HTML — xhtml2pdf 0.2.7 documentation
In the example above, the vendor-specific tags <pdf:pagenumber> and <pdf:pagecount> are used to display page numbers and the total page count.
Read more >
Printing page numbers using Pisa - python - Stack Overflow
One problem I ran into was adding a static footer to my pages, which contains a <pdf:pagenumber /> tag and should show the...
Read more >
renderAs PDF page numbering - Salesforce Stack Exchange
Browse other questions tagged ... Pdf page number in Html content ... Problem set recommendations for a student who has taken classes ...
Read more >
Specifying consistent page numbering for PDF documents
Tagged PDF documents. This technique relates to: ... Example 1: Editing PDF page number formatting specifications using Adobe Acrobat 9 Pro.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found