Skip to content
Discussion options

You must be logged in to vote

Tags are not currently supported.
But you are on the right track:

In [1]: import fitz
In [2]: doc=fitz.open("adobe.pdf")
In [3]: cat=doc.pdf_catalog()
In [4]: doc.xref_get_key(cat, "StructTreeRoot")
Out[4]: ('xref', '109960 0 R')
In [5]:

Usually this is an xref, but could be a dict. So check item[0] of the return code.
If an xref, follow that path further ...

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hellpanderrr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants