PDF tags support #2764
-
Are PDF tags supported in pymupdf? If not, is it possible to get them by xref? Something like:
Am I on the right track here or is there any other way? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Tags are not currently supported. 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. |
Beta Was this translation helpful? Give feedback.
Tags are not currently supported.
But you are on the right track:
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 ...