-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
add_bookmark doesn't set pagenum #968
Comments
Thank you for reporting the issue. I could confirm it. So far, I have no idea why this issue occurs |
EDITED: Updated for clarity Also running into the same issue with the following code:
|
@austinwarnock Examples help best if they are complete and minimal:
|
UPDATE: Work around found By reverting to 1.27.0 we were able to get the bookmarks to work again. Any newer versions did not work. |
Huh, interesting! Thank you for the feedback! |
Looking at the changes, I doubt it: 1.27.0...1.27.1 However, if I remember correctly the first git tag was set wrong (it doesn't match the PyPI release). I'll make a test and a git bisect. |
1.27.9 introduced the issue with 07848e5 I verified it with: from PyPDF2 import PdfFileMerger as PdfMerger
merger = PdfMerger()
merger.append("crazyones.pdf")
bookmark = merger.addBookmark("A bookmark", 0)
bm2 = merger.addBookmark("deeper", 1, parent=bookmark)
merger.write("issue968.pdf")
merger.close() |
Replace this: Using add_bookmark in PdfMerger, the title is fine but none of the page numbers are applied to output PDF.
Environment
Code
This is a minimal, complete example that shows the issue:
PDF
Sorry I can't share the PDF file itself.
The text was updated successfully, but these errors were encountered: