PageImageAreaSave Method (String)
Saves the image to the file.

Namespace: GroupDocs.Parser.Data
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 20.10.0
Syntax
public void Save(
	string filePath
)

Parameters

filePath
Type: SystemString
The path to the file.
Examples

The following example shows how to save images to files:

C#
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
    // Extract images from document
    IEnumerable<PageImageArea> images = parser.GetImages();

    // Check if images extraction is supported
    if (images == null)
    {
        Console.WriteLine("Page images extraction isn't supported");
        return;
    }

    // Iterate over images
    foreach (PageImageArea image in images)
    {
        // Save the image to the file
        image.Save(Guid.NewGuid().ToString() + image.FileType.Extension);
    }
}
See Also