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

Free Support Forum - aspose.com

Transparent Watermark Not Being Flattened

Hello,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

I am trying to flatten a transparent watermark in a PDF created in code with Adobe document objects and it will not work. I am loading an existing PDF file into an Aspose document object and flattening it as indicated below. There appear to be 3 different ways to flatten and none of them will work.

Dim oPDF As New Aspose.Pdf.Document(sPath & "\" & sFile)

oPDF.Flatten()

oPDF.Pages.Flatten()

oPDF.Form.Flatten()

oPDF.Save(sPath & "\" & sFile)

I also tried creating a watermark with Aspose and it did not flatten either. I am enclosing a PDF with a watermark and a Word file with the watermark pasted into it. This is a simple way to test if the watermark is flattened. If the watermark is not transparent (in this case 25% opaque; gray) in Word (after copy/paste) it is not flattened.

I just need to know if your product can do what I am trying to do. Can it?

Regards,

Dan Ludwig

Deloitte Tax LLP

Hi Dan,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thank you for the sample code and template file.

I tried your scenario but I am afraid the Flattening feature does not affect the watermarks. I tried it using Adobe Acrobat X as well and I got the same results as Flattening with Aspose.Pdf for .NET (and mentioned by you). I think the only possibility for you is to convert the complete pages (with watermarks) to images (if you don’t need any field to be editable) and then create a PDF file from those images. If this fits your requirement, you may check the following documentation link to convert each page to Image and then create a PDF file from images.

Convert all PDF pages to JPEG Images

How to Convert an Image to PDF.

Thank You & Best Regards,