WatermarkerRemove Method (PossibleWatermark)
Removes watermark from the document.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public void Remove(
	PossibleWatermark possibleWatermark
)

Parameters

possibleWatermark
Type: GroupDocs.Watermark.SearchPossibleWatermark
The watermark to remove.
Remarks
Learn more about removing watermarks: Removing found watermarks.
Examples
Find and remove the first possible watermark containing particular text or image from a document of any supported type.
C#
using (Watermarker watermarker = new Watermarker(@"D:\input.doc"))
{
    ImageSearchCriteria imageSearchCriteria = new ImageDctHashSearchCriteria(@"D:\logo.png");
    Regex regex = new Regex(@"^Company\sName$", RegexOptions.IgnoreCase);
    TextSearchCriteria textSearchCriteria = new TextSearchCriteria(regex);
    PossibleWatermarkCollection watermarks = watermarker.Search(textSearchCriteria.Or(imageSearchCriteria));
    if (watermarks.Count > 0)
    {
        watermarker.Remove(watermarks[0]);
    }

    watermarker.Save(@"D:\output.doc");
}
See Also