WatermarkManager.Remove() Method
In This Article
Removes watermarks from the document.
Namespace: DevExpress.XtraRichEdit.API.Native
Assembly: DevExpress.RichEdit.v24.2.Core.dll
NuGet Package: DevExpress.RichEdit.Core
#Declaration
#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