-
Notifications
You must be signed in to change notification settings - Fork 510
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
Destination point not set for named links in toc #2088
Comments
Thanks for report this. The problem is an error parsing the |
Have a fix. Problem will be corrected in next version. |
Fixed in PyMuPDF-1.21.1. |
Hello, I would like to reopen this issue, as I encoutered the same problem as encountered in the original post in version 1.23.7. This is resolved when downgrading to 1.21.1 though, so I wondered if it was possible to include a fix in a future release of PyMuPDF. Describe the bug (mandatory)If a pdf outline / toc contains named links, the destination point ("to") is not set To Reproduce (mandatory)Download the PDF file here, then run this code: >>> import fitz
>>> doc = fitz.Document("2302.11382.pdf") # name of the PDF file at download
>>> doc.get_toc(simple=False)[0][-1]
{'kind': 4, 'xref': 21, 'name': 'nameddest=section.1', 'zoom': 0.0} Your configuration (mandatory)
|
@thomascerbelaud - you should find this issue resolved if you use the import statement |
It's working indeed, great thanks! A last question though: is it planned to release a version of |
No, this is a temporary situation. We are planning to swap versions classic <> rebased ("fitz_new") very soon. In that next phase, the current/classic version will still be available as |
Also see discussion #2680 "New 'rebased' implementation of PyMuPDF" |
Please provide all mandatory information!
Describe the bug (mandatory)
If a pdf outline / toc contains named links, the destination point ("to") is not set
To Reproduce (mandatory)
Compile with pdflatex or paste in your browser the command below to get the pdf (rename it to
named_outline.pdf
for the following):Open the pdf and get the toc:
To fix it, it is probably enough (although I am not sure how safe it is) to get the last two items of
"name"
here:Your configuration (mandatory)
For example, the output of
print(sys.version, "\n", sys.platform, "\n", fitz.__doc__)
would be sufficient (for the first two bullets).The text was updated successfully, but these errors were encountered: