An Image is worth a thousand words and cannot be ignored in today’s visual world while creating engaging content. Images can be a great source of information communication as well as grabbing user’s attention. It is often needed to get images from documents, journals or presentations and use them somewhere else. GroupDocs.Parser for Java is a powerful API that helps software developers and programmers to build solution for parsing and extracting images or other information from numerous documents types. It also support saving images in PNG, JPEG, WebP, GIF, BMP and other formats. The API has included support for some popular documents formats, such as PDF, Microsoft Office formats: Word (DOC, DOCX), PowerPoint (PPT, PPTX), Excel (XLS, XLSX), LibreOffice formats, Emails, Ebooks, and many more. It has also included support for some advanced features related to documents parsing, extracting plain and structured text, text searching by keywords, extract metadata or images, containers as well as attachments and many more.
GroupDocs.Parser for Java makes it easy for Java developers to extract images from a documents by implementing a few easy steps.
// Extract images from documents using GroupDocs.Parser API
// Create an instance of Parser class
try (Parser parser = new Parser(Constants.SampleImagesPdf)) {
// Extract images
Iterable<PageImageArea> images = parser.getImages();
// Check if images extraction is supported
if (images == null) {
System.out.println("Images extraction isn't supported");
return;
}
// Iterate over images
for (PageImageArea image : images) {
// Print a page index, rectangle and image type:
System.out.println(String.format("Page: %d, R: %s, Type: %s", image.getPage().getIndex(), image.getRectangle(), image.getFileType()));
}
}
GroupDocs.Parser for Java APIs are supported on all major platforms and operating systems. Before executing the code below, please make sure that you have the following prerequisites installed on your system.
Extract images from documents right now by visiting GroupDocs.Parser Live Demos website. The live demo has the following benefits.
No need to download API
No need to write any code
Just upload the source file
Get download link to save the file
Java documents parse & images extraction API for file formats and images. Extract data for some of the popular file formats as stated below.
(Microsoft Word Binary Format)
(Microsoft Word 2007 Marco File)
(Office 2007+ Word Document)
(Microsoft Word Template Files)
(Microsoft Word 2007+ Template File)
(Microsoft Word Template File )
(Open eBook File)
(Hyper Text Markup Language)
(MHTML Web Archive)
(Web Page Archive Format)
(OpenDocument Presentation Format)
(OpenDocument Spreadsheet)
(OpenDocument Text File Format)
(OneNote Document)
(OpenDocument Standard Format)
(OpenDocument Standard Format)
(Portable Document Format)