Search

Searches all possible watermarks in the document.

public PossibleWatermarkCollection Search()

Return Value

The collection of possible watermarks.

Remarks

The search is conducted in objects specified in SearchableObjects.

Learn more about searching watermarks Searching watermarks.

Examples

Count the possible watermarks in a document of any supported type.

using (Watermarker watermarker = new Watermarker(@"D:\input.doc"))
{
    PossibleWatermarkCollection watermarks = watermarker.Search();
    Console.WrileLine(watermarks.Count);
}

See Also


Search(SearchCriteria)

Searches possible watermarks according to specified search criteria.

public PossibleWatermarkCollection Search(SearchCriteria searchCriteria)
Parameter Type Description
searchCriteria SearchCriteria The search criteria to use.

Return Value

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.

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