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

Free Support Forum - aspose.com

Delete stamp from the PDF document

Hello,

I have added text stamps using TextStamp class of Aspose.pdf.
How can I remove this text stamp using Aspose.pdf?

Thank you,


You may find this topic helpful, as it addresses your question (even though it doesn’t really help mine): <a href="https://forum.aspose.com/t/82777


Hi Jatin,


Thanks for using our products.

In order to remove the stamp object, we need to provide the respective Stamp ID or index number. Please try using either of the following methods to remove Header/Footer from PDF file. So when adding stamp object to PDF file, please try specifying the stamp ID.

DeleteStamp

[C#]

PdfContentEditor contentEditor = new PdfContentEditor();<o:p></o:p>

contentEditor.BindPdf(“file.pdf”);

contentEditor.DeleteStamp(1, new int[] { 2, 3, 5 });

contentEditor.Save(“outfile.pdf”);
DeleteStampByIds
[C#]

PdfContentEditor contentEditor = new PdfContentEditor();<o:p></o:p>

contentEditor.BindPdf(“file.pdf”);

contentEditor.DeleteStampByIds(1, new int[] { 100, 101 });

contentEditor.Save(“outfile.pdf”);

In case you encounter any issue or you have any further query, please feel free to contact.