Skip to content

Instantly share code, notes, and snippets.

@conholdate-docs-gists
Created October 14, 2022 14:00
Show Gist options
  • Save conholdate-docs-gists/dbac88960e59c38ebf6821423559affa to your computer and use it in GitHub Desktop.
Save conholdate-docs-gists/dbac88960e59c38ebf6821423559affa to your computer and use it in GitHub Desktop.
// Create an instance of Parser class
using (Parser parser = new Parser(filePath))
{
// Extract images
IEnumerable<PageImageArea> images = parser.GetImages();
// Check if images extraction is supported
if (images == null)
{
Console.WriteLine("Images extraction isn't supported");
return;
}
// 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));
}
}
@conholdate-docs-gists
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment