Free Support Forum - aspose.com

Remove watermark/image from existing PDF

I need to be able to remove a watermark from existing PDFs we have stored in a database. This is a legitimate requirement (rather than trying to remove trial software watermarks) as we have > 10 million PDFs stored with a “copy” watermark that we now want to store without the watermark. I can remove them with Acrobat, but I haven’t been able to find a product which can do this programmatically. Can Aspose.Pdf.Kit do this?

Shane

Dear Shane,

Thanks for considering Aspose.

The kit doesn’t contain the feature now, but our team will discuss whether the feature should be provided in future.

Best regards.

Hi Willima,

Is this feature i.e to remove water mark from exstings PDFs(water marks not created by aspose componet) exists in the latest version.????

thanks

Satish

Hi Satish,

If the files contain text watermarks then you may use ReplaceText method of PdfContentEditor class. You can pass empty string as the text to be replaced in place of the watermark text. However, if your requirement is different then please share some more details. Also, please share which platform you’re working on – .NET or Java.

Regards,

Hi shahzad.latif ,

Thanks for Quick Reply.

Yes, we have combi of both watermarks i.e TEXT as watermark and Image as Water mark and we are using .NET environment(3.5 f/w). But as of now we are faccing issue with Watermark as image in PDF. Can you please provide solution for this issue...we are in urgent.! thanks in advacne. and BTW Can you please provide some sample to remove the (water mark)TEXT from pdf too.!

Thanks in Advance

Satish

Hi Satish,

You can try the following code snippet to remove text watermark from the PDF file:


PdfContentEditor editor = new PdfContentEditor();

editor.BindPdf(“input.pdf”);

editor.ReplaceText(“Watermark text to be removed”,"");

editor.Save("");


As far as removing image watermarks is concerned, you may try to remove the particular image using the page number and image index as shown in ‘Getting Image Information and Replace Image’ help topic.

I hope this helps. If you find any further questions, please do let us know.
Regards,

Hi Shahzad,

Thanks for the help. I have below concerns...

Text as Water Mark:- its working fine when i replace the watermark text. and is there any possible way to chek whether the Water mark is exsits or not.?

Why beacuase for example:- if i replace editor.ReplaceText("Confidential", ""); For some PDF's there is no WATERMARKING but the "confidenetial" word is replaced.!which is bothering....

So is threre anyway to check i.e place a codition to check WATERMARK exists or not.??

Image as Water Mark:- I have PDFwith images(like GRAPHS,charts.ect) with Watermark as "Confidential" on the PDF which is a Image. i.e PDF with text,Images + IMAGE WATERMARK(WM).so in this case???

So, as you said above i had used the same approach. Issue is..when i try to replace the image all the images(including the WM) are gettig replaced. i,e along with the data which exists over the WATER MARK image. THe data is getting LSOT.!

Thanks

Satish

Hi Satish,

As far as text watermark is concerned, I hop the following topic is going to help in your scenario: Uniquely Identify and Delete Watermark.

However, I’m afraid, I couldn’t understand the issue with the image watermarks. Could you please elaborate the issue with the help of the input PDF file? Also, if the above sample for removing text watermark doesn’t help then please share a sample input PDF for that as well.

We’re sorry for the inconvenience and looking forward to help you out.
Regards,

Hi Shaazad,

If i added the Water mark fom ASPOSE.PDF then we can delete the required STAMP and its fine.

But if that WATER MARK added by some 3rd party tool then Uniquely Identify and Delete Watermark. is unable to find the required STAMP/WaterMark.!!

and regarding the Image Water MArk i will le you know furthur......

thanks

Satish

Hi Satish,

Please share a sample input PDF file for each of these requirements – text and image watermarks. Our team will investigate it further and we’ll try to provide you a solution in our future versions.

We’re sorry for the inconvenience.
Regards,

1 Like