How to add a Watermark

Currently GemBox.Document lacks an API support for Watermarks; they are supported only through preservation in a DOCX file format.

As a workaround, we recommend the following AddWatermark extension method which creates a Picture element as a BehindText image in the header to impersonate a watermark. This Picture element will start from the beginning of the page and will cover the width and height of the whole page.

For your information: this example will not work if your using the continue as free trial feature, probably because the header is overwritten by the trial-version-text that gembox writes to the header and footer.

Mario - GemBoxThur, 1st Mar 2018 1:23pm

Hi,

Yes that is true, this example cannot be used in Trial mode because of its limitations:
- When loading a document - random parts of document text will be replaced with string TRIAL.
- When saving a document - promotional header will be added to every document page and will replace any existing header.

However, you can use it with other working modes (Free, Time Limited and Professional):
https://support.gemboxsoftware.com/kb/articles/gembox-document-free-trial-time-limited-and-professional