-
Notifications
You must be signed in to change notification settings - Fork 263
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
ToC rendering orientation "sticks" when adding landscape pages to end of document #1312
Comments
Thank you for the bug report @kevinthenet 👍 @allcontributors please add @kevinthenet for bug |
I've put up a pull request to add @kevinthenet! 🎉 |
I opened PR #1315 to fix this |
@kevinthenet: you can test the fix using the |
Just checked and can verify this issue is now fixed with the latest changes in maser. Thanks so much for the fix and the speedy response time! 🚀 |
This fixup has been included in the new release published today: |
When a document ends with pages in landscape mode, the rendering mode for the table of contents is "stuck" in landscape when the
render_toc_function
is called. However, the page itself renders in portrait, leading to some weird behavior.I would expect one of the following behaviors:
pdf.insert_toc_placeholder
render_toc_function
pdf.set_orientation(orientation="P")
)Error details
There's no related error message, but below are some proofs this is a bug from the minimal example below:
This happens for the case where landscape content is added at the end of the document and does not occur if the document ends with portrait content
Minimal code
Please include some minimal Python code reproducing your issue:
Environment
Please provide the following information:
fpdf2
version used: 2.8.1Please note this issue persists when using the latest unreleased version @ master branch.
The text was updated successfully, but these errors were encountered: