Extract annotations and regular text separately? #1726
-
Hi. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
There is a rather hacky way
To remove annotations, # do either this:
a = page.first_annot
while a:
a = page.delete_annot(a)
# or this:
doc.xref_set_key(page.xref, "Annots", "null") This will not change the document permanently if you don't save. Doing |
Beta Was this translation helpful? Give feedback.
There is a rather hacky way
To remove annotations,
This will not change the document permanently if you don't save. Doing
doc.close();doc=fitz.open(doc.name)
will recycle the document in original state.