Free Support Forum - aspose.com

Removing a watermark

I have a custom picture watermark in my mail merge document template (watermark not being added by aspose.words…). Is it possible for aspose.words to find the watermark and remove it? If I save the file as a PDF, the watermark is much darker then it should be in word, so I would like to remove the watermark when the file is saved as a PDF… I alreayd have my logic in place to handle the word vs. pdf, just need to igure out what to do with the watermark removal, short of having 2 different templates…

Hi

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

Thanks for your inquiry. Could you please attach your document with watermark here for testing? I will check it and provide you more information.

Best regards,

Attached… The watermark is hard to see but its there. I was trying to make it not noticeable but still there…

Hi Ryan,

Thanks for attaching your document here.

It seems the issue is occuring because of a bug when rendering an MS Image Object to PDF. I have logged this issue and it will be fixed in a future verison. We will keep you informed of any development.

You can fix this by reinserting the image as a normal picture object (Windows metafile) and this issue does not occur. I have made this change and sent the modified document to your inbox.

Also, if you still require code to remove the image from the header, please feel free to ask and I will provide some for you.

Thanks,

What exactly did you change in the template because its working well now? I only see one way to insert a watermark in word. Did you reformat the image?

Hi,

Would you possibly be able to provide the code to remove the image? I have a similar issue where I would like to remove an image during a conversion.

Thanks

Chris

Hi Ryan,

Thanks for this additional information.

You can choose what type of object content is inserted as by using the Paste Special option as shown below:

Regarding the code for removing images from the header, I have provided the code for this below:

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

Document doc = new Document("contactsummary.doc");

foreach(Section section in doc.Sections)

section.DeleteHeaderFooterShapes();

doc.Save("contactsummary out.pdf");

If you have any further inquiries, please feel free to ask.

Thanks,

The issues you have found earlier (filed as 20105) have been fixed in this .NET update and in this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as ) have been fixed in this update. This message was posted using BugNotificationTool from Downloads module by MuzammilKhan