We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Verifying the TextStamp

Hi There,


We are using Apose PDF Java library to apply TextStamps, and it is working fine with no issues. What I want to do is add some unit tests to verify that TextStamps are there.
Can you please direct me to some code which reads the text stamps so that I can verify?

Thanks,
Manish

Hello Manish,


Thanks for contacting support. We are checking details over our end for the specific requirement and will get back to you shortly.

Best Regards,

Hello Manish,


Thanks for your patience.

Please check following code snippet, in order to read/get TextStamp from PDF pages.

Document
doc = new Document(dataDir + “Experiment.pdf”);<o:p></o:p>

PdfContentEditor pdf = new PdfContentEditor();

pdf.bindPdf(doc);

com.aspose.pdf.facades.StampInfo[] info = pdf.getStamps(1);

System.out.println(info.length);

for(int i = 0; i<info.length;i++){

System.out.println(info[i].getText());

}



In case of any further assistance, please feel free to contact us.


Best Regards,

This is really helpful. Thanks Asad !!