WatermarkerRemove Method (PossibleWatermarkCollection)
Removes all watermarks in the collection from the document.

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

Parameters

possibleWatermarks
Type: GroupDocs.Watermark.SearchPossibleWatermarkCollection
The collection of watermarks to remove.
Remarks
Learn more about removing watermarks Removing found watermarks.
Examples
Find and remove all possible watermarks 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));
    watermarker.Remove(watermarks);
    watermarker.Save(@"D:\output.doc");
}
See Also