@DigitalPowerDev @sunil.rongali
Please take a look at this output - result.pdf (115.3 KB) (watermark is removed). We used following code to achieve these results (using latest API version):
using (Watermarker watermarker = new Watermarker("sample.pdf"))
{
// Get document content
var doc = watermarker.GetContent<PdfContent>();
// Set search criteria for vector watermarks
var criteria = new VectorSearchCriteria();
// Define watermark color
var watermarkColor = System.Drawing.ColorTranslator.FromHtml("#a9aaae");
var fromSystemColor = GroupDocs.Watermark.Watermarks.Color.FromArgb(watermarkColor.A, watermarkColor.R,
watermarkColor.G, watermarkColor.B);
// Define color range criteria for the vector watermark
var criteriaVectorColorRange = new ColorRange(fromSystemColor)
{
MinBrightness = 0.5f,
MaxBrightness = 0.7f
};
// Apply color range criteria to the search criteria
criteria.VectorColorRange = criteriaVectorColorRange;
// Search for possible vector watermarks
var possibleWatermarkCollection = doc.Search(criteria);
// Clear any found watermarks
possibleWatermarkCollection.Clear();
// Save the result
watermarker.Save("result.pdf");
}
```o