VectorSearchCriteria
Contents
[
Hide
]
VectorSearchCriteria class
Represents criteria allowing filtering by watermark color.
public class VectorSearchCriteria : SearchCriteria
Constructors
Name | Description |
---|---|
VectorSearchCriteria() | Initializes a new instance of the VectorSearchCriteria class. |
Properties
Name | Description |
---|---|
VectorColorRange { get; set; } | Gets or sets the range of colors which are used to filter vector watermarks by foreground color. |
Methods
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. |
Remarks
Learn more:
Examples
Find and remove watermark using search criteria.
using (Watermarker watermarker = new Watermarker(@"C:\test.pdf"))
{
VectorSearchCriteria searchCriteria = new VectorSearchCriteria();
Color watermarkColor = ColorTranslator.FromHtml("#a9aaae");
GroupDocs.Watermark.Watermarks.Color fromSystemColor = GroupDocs.Watermark.Watermarks.Color.FromArgb(watermarkColor.A, watermarkColor.R, watermarkColor.G, watermarkColor.B);
ColorRange criteriaVectorColorRange = new ColorRange(fromSystemColor)
{
MinBrightness = 0.1f,
MaxBrightness = 0.7f
};
searchCriteria.VectorColorRange = criteriaVectorColorRange;
PossibleWatermarkCollection possibleWatermarkCollection = watermarker.Search(searchCriteria);
possibleWatermarkCollection.Clear();
watermarker.Save(@"C:\modified_test.pdf");
}
See Also
- class SearchCriteria
- namespace GroupDocs.Watermark.Search.SearchCriteria
- assembly GroupDocs.Watermark