WatermarkerSearch Method (SearchCriteria)
Searches possible watermarks according to specified search criteria.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public PossibleWatermarkCollection Search(
	SearchCriteria searchCriteria
)

Parameters

searchCriteria
Type: GroupDocs.Watermark.Search.SearchCriteriaSearchCriteria
The search criteria to use.

Return Value

Type: PossibleWatermarkCollection
The collection of possible watermarks.
Remarks

The search is conducted in objects specified in SearchableObjects.

Learn more about searching watermarks Searching 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));
    watermarks.Clear();
    watermarker.Save(@"D:\output.doc");
}
See Also