ParserGetImages Method (PageAreaOptions)
Extracts images from the document using customization options (to set the rectangular area that contains images).

Namespace: GroupDocs.Parser
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 20.8.0
public IEnumerable<PageImageArea> GetImages(
	PageAreaOptions options


Type: GroupDocs.Parser.OptionsPageAreaOptions
The options for images extraction.

Return Value

Type: IEnumerablePageImageArea
A collection of PageImageArea objects; null if images extraction isn't supported.

The following example shows how to extract only images from the upper-left courner:

// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
    // Create the options which are used for images extraction
    PageAreaOptions options = new PageAreaOptions(new Rectangle(new Point(0, 0), new Size(300, 100)));
    // Extract images from the upper-left courner of a page:
    IEnumerable<PageImageArea> images = parser.GetImages(options);
    // Check if images extraction is supported
    if (images == null)
        Console.WriteLine("Page images extraction isn't supported");
    // Iterate over images
    foreach (PageImageArea image in images)
        // Print a page index, rectangle and image type:
        Console.WriteLine(string.Format("Page: {0}, R: {1}, Type: {2}", image.Page.Index, image.Rectangle, image.FileType));
See Also