Skip to main content
All docs
V24.1

WatermarkManager.Remove() Method

Removes watermarks from the document.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v24.1.Core.dll

NuGet Packages: DevExpress.RichEdit.Core, DevExpress.Win.Navigation

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