TextFormattingSearchCriteria
Leave feedback
On this page
Represents criteria allowing filtering by text formatting.
public class TextFormattingSearchCriteria : SearchCriteria
| Name | Description |
|---|---|
| TextFormattingSearchCriteria() | Initializes a new instance of the TextFormattingSearchCriteria class. |
| Name | Description |
|---|---|
| BackgroundColorRange { get; set; } | Gets or sets the range of colors which are used to filter watermarks by text background color. |
| FontBold { get; set; } | Gets or sets a value indicating whether the font used in watermark text formatting is bold. |
| FontItalic { get; set; } | Gets or sets a value indicating whether the font used in watermark text formatting is italic. |
| FontName { get; set; } | Gets or sets the name of the font which is used in possible watermark text formatting. |
| FontStrikeout { get; set; } | Gets or sets a value indicating whether the font used in watermark text formatting is strikeout. |
| FontUnderline { get; set; } | Gets or sets a value indicating whether the font used in watermark text formatting is underline. |
| ForegroundColorRange { get; set; } | Gets or sets the range of colors which are used to filter watermarks by text foreground color. |
| MaxFontSize { get; set; } | Gets or sets the ending value of the font size. |
| MinFontSize { get; set; } | Gets or sets the starting value of the font size. |
| 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:
Remove possible watermarks with a particular text formatting (regardless of document type).
using (Watermarker watermarker = new Watermarker(@"D:\test.doc"))
{
TextFormattingSearchCriteria criteria = new TextFormattingSearchCriteria();
criteria.ForegroundColorRange = new ColorRange();
criteria.ForegroundColorRange.MinHue = -5;
criteria.ForegroundColorRange.MaxHue = 10;
criteria.ForegroundColorRange.MinBrightness = 0.01f;
criteria.ForegroundColorRange.MaxBrightness = 0.99f;
criteria.BackgroundColorRange = new ColorRange();
criteria.BackgroundColorRange.IsEmpty = true;
criteria.FontName = "Arial";
criteria.MinFontSize = 19;
criteria.MaxFontSize = 42;
criteria.FontBold = true;
PossibleWatermarkCollection watermarks = watermarker.Search(criteria);
watermarks.Clear();
watermarker.Save();
}
- class SearchCriteria
- 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.