TextSearchCriteria
Leave feedback
On this page
Represents criteria allowing filtering by watermark text.
public class TextSearchCriteria : PageSearchCriteria
| Name | Description |
|---|---|
| TextSearchCriteria(Regex) | Initializes a new instance of the TextSearchCriteria class with a specified regular expression. |
| TextSearchCriteria(string) | Initializes a new instance of the TextSearchCriteria class with a search string. |
| TextSearchCriteria(string, bool) | Initializes a new instance of the TextSearchCriteria class with a search string and a flag for comparison. |
| Name | Description |
|---|---|
| Pages { get; set; } | Gets or sets the list of specific page numbers |
| Pattern { get; } | Gets the search pattern. |
| SkipUnreadableCharacters { get; set; } | Gets or sets a value indicating that unreadable characters will be skipped during string comparison. |
| Name | Description |
|---|---|
| And(SearchCriteria) | Combines this SearchCriteria with other criteria using logical AND operator. |
| Not() | Negates this SearchCriteria. |
| Or(SearchCriteria) | Combines this SearchCriteria with other criteria using logical OR operator. |
Learn more:
Find and remove watermark using search criteria.
using (Watermarker watermarker = new Watermarker(@"C:\test.some_ext"))
{
SizeSearchCriteria widthRange = new SizeSearchCriteria(Dimension.Width, 50, 100);
RotateAngleSearchCriteria rotateAngle = new RotateAngleSearchCriteria(0, 45);
TextSearchCriteria textCriteria = new TextSearchCriteria(new Regex("^Test watermark$"));
PossibleWatermarkCollection watermarks = watermarker.Search(textCriteria.And(widthRange.Or(rotateAngle)));
watermarks.Clear();
watermarker.Save();
}
- class PageSearchCriteria
- namespace GroupDocs.Watermark.Search.SearchCriteria
- assembly GroupDocs.Watermark
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.