-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Description
MCVE
PyPDF2 seems unable to retrieve the named destinations in a sample PDF document exported with LibreOffice Writer 7.3:
>>> import PyPDF2
>>> r = PyPDF2.PdfReader("lorem_ipsum.pdf")
>>> r.metadata
{'/Creator': 'Writer', '/Producer': 'LibreOffice 7.3', '/CreationDate': "D:20220727095634+02'00'"}
>>> r.named_destinations
{}At first, I suspected a bug in LibreOffice, but Poppler's pdfinfo utility seems to have no trouble with it:
$ pdfinfo -dests lorem_ipsum.pdf
Page Destination Name
1 [ XYZ 92 736 null ] "Dolor2520sit2520amet"
2 [ XYZ 92 627 null ] "Sodales2520posuere2520metus2520id"URL anchor links also work as expected:
$ firefox lorem_ipsum.pdf#Sodales2520posuere2520metus2520idEnvironment
$ python -m platform
Linux-5.15.0-41-generic-x86_64-with-glibc2.10
$ python -c "import PyPDF2;print(PyPDF2.__version__)"
2.8.1Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels