You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the footer of the first page, the actual number of pages and {nb} are overlapping.
If the Table of contents has multiple pages, the footer() function is called twice. Once when the ToC placeholder is inserted and another time when the actual ToC is created and a new page begins in render_toc().
Minimal code
This code creates an pdf with a footer and a Table of contents that spans multiple pages.
If i am not mistaken, this would be solved for my example (and probably most simple footers) by first inserting the table of contents and then substituting the page numbers. Inside _putpages().
But this fix would not solve the underlying issue of the footer being called twice. I am not sure about that. In insert_toc_placeholder() the placeholder pages are created with self.add_page() which also creates a footer. Maybe it would be better to create "real" blank pages without a footer.
Environment
OS Windows and Linux
Python version 3.6.9
fpdf2 version 2.5.7
The text was updated successfully, but these errors were encountered:
In the footer of the first page, the actual number of pages and {nb} are overlapping.
If the Table of contents has multiple pages, the
footer()
function is called twice. Once when the ToC placeholder is inserted and another time when the actual ToC is created and a new page begins inrender_toc()
.Minimal code
This code creates an pdf with a footer and a Table of contents that spans multiple pages.
Some thoughts
If i am not mistaken, this would be solved for my example (and probably most simple footers) by first inserting the table of contents and then substituting the page numbers. Inside
_putpages()
.But this fix would not solve the underlying issue of the footer being called twice. I am not sure about that. In
insert_toc_placeholder()
the placeholder pages are created withself.add_page()
which also creates a footer. Maybe it would be better to create "real" blank pages without a footer.Environment
fpdf2
version 2.5.7The text was updated successfully, but these errors were encountered: