TextSearchCriteria class

TextSearchCriteria class

Represents criteria allowing filtering by watermark text.

The TextSearchCriteria type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the TextSearchCriteria class with a specified regular expression.
init Initializes a new TextSearchCriteria with a search string and an optional case‑sensitivity flag.
init Initializes a new TextSearchCriteria with a search string.

Methods

Method Description
and_ Combines this SearchCriteria with other criteria using the logical AND operator. (inherited from SearchCriteria)
and_search_criteria (inherited from SearchCriteria)
not_ Negates this SearchCriteria. (inherited from SearchCriteria)
or_ Combines this SearchCriteria with other criteria using logical OR operator. (inherited from SearchCriteria)
or_search_criteria (inherited from SearchCriteria)

Properties

Property Description
pattern The regular expression pattern to match.
skip_unreadable_characters The property indicating whether unreadable characters are skipped during string comparison.
pages The list of specific page numbers. (inherited from PageSearchCriteria)

Example

import groupdocs.watermark as gw
import groupdocs.watermark.search.searchcriteria as gws_sc

with gw.Watermarker("document.pdf") as watermarker:
    text_criteria = gws_sc.TextSearchCriteria("© 2017")
    possible = watermarker.search(text_criteria)
    print("Found", possible.count, "possible watermark(s)")

Guides

Task guides that use TextSearchCriteria:

See Also