VectorSearchCriteria
Leave feedback
On this page
Represents criteria allowing filtering by watermark color.
public class VectorSearchCriteria : SearchCriteria
| Name | Description |
|---|---|
| VectorSearchCriteria() | Initializes a new instance of the VectorSearchCriteria class. |
| Name | Description |
|---|---|
| VectorColorRange { get; set; } | Gets or sets the range of colors which are used to filter vector watermarks by foreground color. |
| 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.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");
}
- 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.