Skip to content
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

Adding TOC shifts pages and messes with page orientation #162

Open
amauryavril opened this issue Aug 7, 2020 · 1 comment
Open

Adding TOC shifts pages and messes with page orientation #162

amauryavril opened this issue Aug 7, 2020 · 1 comment

Comments

@amauryavril
Copy link

Hi,

I'm creating a pdf document with a table of content adapted from the attic/TOC.py script. It's all working well expect that I run into a problem when my pages have different page orientation. It seems that moving the TOC to the first page shifts all the document by the number of pages needed for the TOC. At the end I end up with wrong page orientations.

For example, let's say my last page is set up as orientation="L". If I have a TOC of one page, it will be moved at the begining of the document and will shifts my pages. At then end, I will have a landscaped penultimate page and a portrait last page.

How can I resolve this? Is there a way to move the whole page for the TOC instead of just moving the contents?
Thank you for your help!

@Lucas-C
Copy link

Lucas-C commented Sep 1, 2021

PyFPDF is not maintained anymore, you may want to check PyFPDF/fpdf2 as its successor, with a 99%-compatible API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants