Skip to main content
All docs
V25.1
  • WatermarkManager.Remove() Method

    Removes watermarks from the document.

    Namespace: DevExpress.XtraRichEdit.API.Native

    Assembly: DevExpress.RichEdit.v25.1.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.Docx);
    }
    
    See Also