@Farhan.Raza
Dear Farhan,
Thank You for your support. Here You can see Signed Document, and then I added image in that document,and in Output-after-image-stamp.pdf Signature is corrupted, it is not showing any information about signer, It should show at least signer name in signature details, it is saying Signature contains corrupted data.
I agree with you that Signature should be Invalidate after changing, but it should not be corrupted. Information should be there.
I am using Aspose.PDF for Java 19.8
I used this code to add image Stamp:
String dataDir = "C:/Users/Usman/Desktop/";
Document pdfDocument = new Document(dataDir + "Signed-Document.pdf");
// create image stamp
ImageStamp imageStamp = new ImageStamp(dataDir+"Cofidential.png");
imageStamp.setBackground(true);
imageStamp.setXIndent(300);
imageStamp.setYIndent(300);
imageStamp.setHeight(147);
imageStamp.setWidth(189);
// add stamp to particular page
Page page=pdfDocument.getPages().get_Item(1);
page.addStamp(imageStamp);
// save output document
pdfDocument.save(dataDir+"OutPut-after-image-stamp.pdf");
Signed-Document.pdf (176.8 KB)
OutPut-after-image-stamp.pdf (248.4 KB)