I am using PDFTron to try and determine if a page has been stamped but have not been able to find a method to do this.
Has anyone done this in Java, and if so, would you be kind enough to post sample code
Thanks, in advance
Neil
def AnnotationHighLevelAPI(doc):
# The following code snippet traverses all annotations in the document
print("Traversing all annotations in the document...")
page_num = 1
itr = doc.GetPageIterator()
while itr.HasNext():
print("Page " + str(page_num) + ": ")
page_num = page_num + 1
page = itr.Current()
num_annots = page.GetNumAnnots()
i = 0
while i < num_annots:
annot = page.GetAnnot(i)
if not annot.IsValid():
continue
print("Annot Type: " + annot.GetSDFObj().Get("Subtype").Value().GetName())
type = annot.GetType()
if type == Annot.e_Stamp:
# Annot <= Annots.Markup <= Annots.RubberStamp
stamp = RubberStamp(annot)
print("Subject: " + stamp.GetSubject()) # I think this will say "Return" or "Destroy" in your case
i = i + 1
itr.Next()