WatermarkerGetImages Method
Finds all images in the document.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 20.7.0
Syntax
public WatermarkableImageCollection GetImages()

Return Value

Type: WatermarkableImageCollection
The collection of found images.
Remarks

The search is conducted in objects specified in SearchableObjects.

Learn more about searching watermarks Searching watermarks.

Examples
Add watermark to all images in a document of any supported type.
C#
using (Watermarker watermarker = new Watermarker(@"D:\input.doc"))
{
    // Initialize text or image watermark.
    TextWatermark watermark = new TextWatermark("DRAFT", new Font("Arial", 19));

    // Find all images in the document.
    WatermarkableImageCollection images = watermarker.GetImages();

    // Add watermark.
    foreach (WatermarkableImage watermarkableImage in images)
    {
        watermarkableImage.AddWatermark(watermark);
    }

    // Save changes.
    watermarker.Save(@"D:\output.doc");
}
See Also