TextSearchCriteria class
Leave feedback
On this page
Represents criteria allowing filtering by watermark text.
Learn more:
The TextSearchCriteria type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new TextSearchCriteria with a specified regular expression. |
| init | Initializes a new instance of the TextSearchCriteria class with a search string and a flag for case‑sensitive comparison. |
| init | Initializes a new instance of the TextSearchCriteria class with a search string. |
| 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 the logical OR operator. (inherited from SearchCriteria) |
| or_search_criteria | (inherited from SearchCriteria) |
| 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) |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.search.search_criteria import TextSearchCriteria
def search_by_text():
with Watermarker("./document.pdf") as watermarker:
possible = watermarker.search(TextSearchCriteria("CONFIDENTIAL"))
print("Found", len(possible), "possible watermark(s)")
if __name__ == "__main__":
search_by_text()
Task guides that use TextSearchCriteria:
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.