SearchableObjects

Watermarker.SearchableObjects property

Gets or sets the content objects that are to be included in a watermark search.

public SearchableObjects SearchableObjects { get; set; }

Property Value

The objects that are to be included in a watermark search.

Remarks

This property also specifies content objects which are used in image search. For more information see Search and GetImages methods.

Learn more about searching watermarks: Searching watermarks.

Examples

Remove all XObjects and Artifacts from a pdf document.

using (Watermarker watermarker = new Watermarker(@"D:\test.pdf"))
{
    // Specify that only XObjects and Artifacts should be searched for.
    watermarker.SearchableObjects.PdfSearchableObjects
        = PdfSearchableObjects.XObjects | PdfSearchableObjects.Artifacts; 

    PossibleWatermarkCollection watermarks = watermarker.Search();

    // Remove all found objects.
    watermarks.Clear();

    // Save changes.
    watermarker.Save();
}

See Also