DocumentPartFindImages Method
Finds all images in the document. The search is conducted in objects specified in SearchableObjects.

Namespace: GroupDocs.Watermark
Assembly: GroupDocs.Watermark (in GroupDocs.Watermark.dll) Version: 19.5
Syntax
public WatermarkableImageCollection FindImages()

Return Value

Type: WatermarkableImageCollection
The collection of found images.
Examples
Add watermark to all images in a document of any supported type.
C#
using (Document document = Document.Load(@"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 = document.FindImages();

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

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