We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Watermark If already there remove old & create new watermark text

1. How do we 
  • check and remove Watermark if already there
  • then add a new watermark text.
2. How to set margin
  • set margins different for first page and same for all other pages
  • set header margins

3 Replies

SY Sethumanikkam Yogendran Syncfusion Team February 6, 2017 07:07 AM UTC

Hi Nilofer,

Thank you for contacting Syncfusion support.

1. How do we check and remove Watermark if already there and then add a new watermark text?.
You can use `Watermark` API from WordDocument instance to add or modify the watermark and `TextWatermark` class represents text watermark in the Word document.

Please refer our UG link to know more about how to apply watermark using DocIO.

2. How to set margins different for first page and same for all other pages and set header margin?
Page margins and header/footer distances are common for entire section. To set specific margins different for first page and same for all other pages , then you can specify first page alone as single section and all other pages as another section in your input Word document.

You can use `WPageSetup` class to specify the page margins and header/footer distance for a section in a Word document using DocIO.

Please refer below UG links to know more about page layout settings and working with headers and footers using DocIO.
Creating document with different page settings
Working with headers and footers

Still if you are not able to meet your requirement with provided code snippets in the above mentioned UG links, then kindly revert us with your sample or code snippet with input template and screenshot/output Word document of the expected result which will helpful to provide you the appropriate solution at the earliest.

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y



NI Nilofer February 8, 2017 07:47 AM UTC

Thanks for the Response,

You can use `Watermark` API from WordDocument instance to add or modify the watermark and `TextWatermark` class represents text watermark in the Word document.
you mean to say syncfusion doesn't have option to remove watermarks available in document?


SY Sethumanikkam Yogendran Syncfusion Team February 9, 2017 04:14 AM UTC

Hi Nilofer,

Thank you for your update.

You can remove Watermark from the Word document by setting “null” value to the “Watermark” property in “WordDocument” instance. Please refer below highlighted code, and let us know if it helps you.
 
wordDocument.Watermark = null; 

Please let us know if you have any other questions.

Regards,
Sethumanikkam.Y


Loader.
Up arrow icon