New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<pdf:pagenumber>
and <pdf:pagecount>
causes page number to be printed twice
#106
Comments
+1 |
+1 |
+1 (or +11) |
+1, experienced the same thing. Is there any way we can help to fix it? |
+1 I have the same problem with the pdf:pagecount tag. It's show 11 instead of 1, or 22 instead of 2. |
+1. Tested with |
I also experience it but I found a workaround. It was good enough to put one space just after the tag, i.e. change |
+11 |
+1 |
To anyone bothered by this issue and thinking it's very old, silly and simple, yet no one is solving it, proving that this project is abandoned: NO! Please feel encouraged to resolve the issue in the |
I looked through the code but don't really understand where the issue might be taking place. |
my test case, "Page 1 of 5": code: but there is a solution: |
Un parche que soluciona, pero no es la manera correcta, es ocultar el segundo pdf:pagecount, ya que por lo visto el ultimo se esta repitiendo dando como resultado 1 de N Página |
to "correct" just put |
I have the same issues. |
I downgrade the library version and it worked for me. I was using xhtml2pdf==0.2.5 and now I am using xhtml2pdf==0.2.3 |
I was able to fix by adding a new line like
It was stated on the document https://xhtml2pdf.readthedocs.io/en/latest/format_html.html#example-with-2-static-frames-and-1-content-frame
|
<pdf:pagenumber>
and <pdf:pagecount>
causes page number to be printed twice
+1 |
@luisza thank you for picking up this old issue! |
unbelievable. i never thought i would see the day. i no longer use this library but thx @JanEgner |
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.
The text was updated successfully, but these errors were encountered: