Replies: 1 comment 1 reply
-
This is so by design. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description of the bug
In the dest returned by Page.get_links() and Document.get_toc(), both 0-based (kind=LINK_GOTO and LINK_GOTOR) and 1-based (kind=LINK_NAMED) page values exist, which is not unified. Is this by design or a bug? If so, why is it designed this way?
From the document https://pymupdf.readthedocs.io/en/latest/document.html#Document.get_toc, we can see the specification of Document.get_toc(), especially Dest as following:
How to reproduce the bug
ECR Cross Account.pdf
kind=LINK_NAMED, and page is 1-base in dest returned by Document.get_toc()
pdf-example-bookmarks.pdf
kind=LINK_GOTO , and page is 0-base in dest returned by Document.get_toc()
PyMuPDF version
1.24.9
Operating system
Linux
Python version
3.8
Beta Was this translation helpful? Give feedback.
All reactions