all Destinations #2754
linlinsky2023
started this conversation in
General
Replies: 2 comments 5 replies
-
I get the link dict like this {'kind': 4, 'xref': 50, 'from': Rect(141.74899291992188, 92.5460205078125, 199.34100341796875, 105.8489990234375), 'name': 'nameddest=F201.090000', 'id': '}. how I can get the page number by the "nameddest=F201.090000" |
Beta Was this translation helpful? Give feedback.
4 replies
-
@linlinsky2023 with the new version 1.23.6 you can do this: In [1]: import fitz_new as fitz
In [2]: doc=fitz.open("pymupdf.pdf")
In [3]: names = doc.resolve_names()
In [4]: names["Doc-Start"]
Out[4]: {'page': 0, 'to': (72.0, 720.0), 'zoom': 0.0}
In [5]: fitz.__version__
Out[5]: '1.23.6'
In [6]: doc=fitz.open("pandas.pdf")
In [7]: names = doc.resolve_names()
In [8]: names["Doc-Start"]
Out[8]: {'page': 0, 'to': (72.0, 720.0), 'zoom': 0.0}
In [9]: len(names)
Out[9]: 12912
In [10]: list(names.items())[5000]
Out[10]: ('paragraph*.5062', {'page': 2299, 'to': (72.0, 586.255), 'zoom': 0.0})
In [11]: |
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
Uh oh!
There was an error while loading. Please reload this page.
-
How I can get the all Destinations,like pypdf2 reader.getNamedDestinations()
Beta Was this translation helpful? Give feedback.
All reactions