-
-
Notifications
You must be signed in to change notification settings - Fork 641
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 />
is not working anymore with 0.2.9
#670
Comments
@timoludwig I don´t think itś our stylesheet removing it makes no difference. |
What is the actual issue about: Apparently, https://xhtml2pdf.readthedocs.io/en/latest/format_html.html#example-with-2-static-frames-and-1-content-frame is not affected - at least it gives me the correct values. By the way: The corresponding commit might be 817c901. |
<pdf:pagecount>
is not working anymore with 0.2.9<pdf:pagenumber />
is not working anymore with 0.2.9
Sorry for the confusion, it was Unfortunately I don't have time to dig deeper at the moment, I'll revisit this in November. |
I can also reproduce this issue, and here's my observations. It looks like it was potentially introduced here: "Support add pagenumber and page count as simple text" I've noticed that whilst you can have page numbers "inline" as of 0.2.9, it seems to have broken the page number tag when it's the only child element: This no longer works: <td><pdf:pagenumber /></td> <!-- Outputs: <td></td> --> However when you introduce some text either side of the tag, with whitespace around the tag, the page number is now rendered (along with the additional text). <td>TEST <pdf:pagenumber /></td> <!-- Outputs: <td>TEST 1</td> --> If you introduce text either side of the tag without whitespace around the tag, the page number is rendered twice! <td>TEST<pdf:pagenumber /></td> <!-- Outputs: <td>TEST11</td> --> I tested a workaround with a zero-width space, however that appeared to cause the page number to be rendered twice too. <td>​<pdf:pagenumber /></td> <!-- Outputs: <td>​11</td> --> Other kinds of whitespace make no difference and the number is still not rendered. |
As of version 0.2.13, using |
Interestingly, the page counter
<pdf:pagenumber/>
in the footer did work for me in previous versions including0.2.8
(so I couldn't reproduce #618 or #654), but with the new version0.2.9
released, they don't work anymore.The part in the footer where the number is supposed to be is just empty.
Could this also be related to some custom styles in my style sheet?
Not sure how to provide a minimal example to reproduce the problem, are there already some test cases related to page numbers which can be adapted to cover more use cases?
As for a non-minimal example, see e.g. this test page:
With xhtml2pdf version
0.2.8
(currentdevelop
branch - page numbers are working):https://github.com/digitalfabrik/integreat-cms/blob/7393f06527f0e5f6538ea8eeb2d97ac90aa0c6e0/tests/pdf/files/e155c5e38b/Integreat%20-%20Englisch%20-%20Welcome.pdf
With xhtml2pdf version
0.2.9
(currentupdate/xhtml2pdf
branch - page numbers are not working):https://github.com/digitalfabrik/integreat-cms/blob/bc9d0ca1787fe582f8ddc0bcfdb0a80de6dadcc2/tests/pdf/files/e155c5e38b/Integreat%20-%20Englisch%20-%20Welcome.pdf
The text was updated successfully, but these errors were encountered: