SizeSearchCriteria class
Leave feedback
On this page
Represents criteria allowing filtering by watermark size.
Learn more:
The SizeSearchCriteria type exposes the following members:
| Constructor | Description |
|---|---|
| init | Initializes a new instance of the SizeSearchCriteria class with a specified dimension, a starting value and an ending value. |
| 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) |
| Property | Description |
|---|---|
| dimension | The dimension of watermark to search by. |
| maximum | The ending value. |
| minimum | The starting value. |
from groupdocs.watermark import Watermarker, SizeSearchCriteria, RotateAngleSearchCriteria, TextSearchCriteria, Dimension, PossibleWatermarkCollection
import re
with Watermarker(r"C:\test.some_ext") as watermarker:
width_range = SizeSearchCriteria(Dimension.Width, 50, 100)
rotate_angle = RotateAngleSearchCriteria(0, 45)
text_criteria = TextSearchCriteria(re.compile(r"^Test watermark$"))
watermarks = watermarker.search(text_criteria.and_(width_range.or_(rotate_angle)))
watermarks.clear()
watermarker.save()
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.