SizeSearchCriteria class

SizeSearchCriteria class

Represents criteria allowing filtering by watermark size.

Learn more:

The SizeSearchCriteria type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the SizeSearchCriteria class with a specified dimension, a starting value and an ending value.

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
dimension The dimension of watermark to search by.
maximum The ending value.
minimum The starting value.

Example

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()

See Also