Skip to main content
A newer version of this page is available. .
All docs
V21.2
.NET Framework 4.5.2+

WatermarkManager.Remove() Method

Removes watermarks from the document.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v21.2.Core.dll

NuGet Package: DevExpress.RichEdit.Core

Declaration

void Remove()

Example

The code sample below removes an image watermark from the document. Use the WatermarkManager.Type property to check the watermark type.

using (RichEditDocumentServer wordProcessor = new RichEditDocumentServer())
{
    wordProcessor.LoadDocument("FirstLook.docx");
    WatermarkManager watermarkManager = 
        wordProcessor.Document.WatermarkManager;
    if (watermarkManager.Type == WatermarkType.Image)
    {
         watermarkManager.Remove();
    }

    wordProcessor.SaveDocument("FirstLook_new.docx", DocumentFormat.OpenXml);
}
See Also