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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Watermark If already there remove old & create new watermark text

Thread ID:

Created:

Updated:

Platform:

Replies:

128667 Feb 3,2017 05:22 PM UTC Feb 9,2017 04:14 AM UTC Windows Forms 3
loading
Tags: DocIO
Nilofer
Asked On February 3, 2017 05:22 PM UTC

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

Sethumanikkam Yogendran [Syncfusion]
Replied On 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


Nilofer
Replied On 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?

Sethumanikkam Yogendran [Syncfusion]
Replied On 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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;