[Release] GroupDocs.Parser for Java 26.10

Dear GroupDocs users, we’re pleased to announce GroupDocs.Parser for Java 26.10. This release fixes the NullPointerException that every search not scoped to a page threw since 25.5, makes getStructure() work for Word documents with tables in headers or footers, reports password-protected documents and PDF encryption correctly in getFileInfo, and positions PDF images from the top of the page like the other page areas. Licensing is now performed by GroupDocs.Foundation, as in the other GroupDocs products, and the bundled Aspose components are updated. Three changes alter existing behaviour, so please review the section below before upgrading.

Behaviour changes to check before upgrading

  • The top coordinate of PDF image rectangles is now measured from the top of the page; code that converted it from the bottom must drop that conversion.
  • In the structure XML of Word documents, words separated by a Word break character are now separated by a space.

Fix — NullPointerException in search not scoped to a page

Since 25.5, Parser.search threw NullPointerException for the search(String) overload, for SearchOptions with searchByPages set to false (the default) and for searches that request highlights. These calls return the search results again. Searches with searchByPages set to true were not affected. (PARSERJAVA-491)

try (Parser parser = new Parser("sample.pdf")) {
    Iterable<SearchResult> results = parser.search("lorem");
    if (results == null) {
        return; // Search isn't supported for this document
    }

    for (SearchResult result : results) {
        System.out.println(result.getPosition() + ": " + result.getText());
    }
}

Fix — document structure of Word documents

Parser.getStructure() threw on Word documents with a table in a header or footer, and could return XML that does not parse when the text contained control characters. Header and footer tables are now described by their logical grid, Word break characters become a space, characters that XML 1.0 does not allow are dropped, and attribute values are escaped the same way as text. (PARSERJAVA-513)

Fix — file information for password-protected documents

Parser.getFileInfo(String filePath) returned a size of 0 and isEncrypted() set to false for password-protected DOCX and XLSX files, and no file type for PPTX. It now returns the same as the InputStream overload: the file size, isEncrypted() set to true and FileType.Unknown, since the format of an encrypted document cannot be read without the password. (PARSERJAVA)

Fix — encryption of PDF documents

FileInfo.isEncrypted() returned true for every PDF document. It is now true only for encrypted ones. (PARSERJAVA)

Fix — position of PDF images

PDF image rectangles returned by Parser.getImages() were measured from the bottom of the page, while text, tables and the other page areas are measured from the top. Images are now measured from the top as well, so getImages(PageAreaOptions) finds the images inside the given rectangle. (PARSERJAVA)

try (Parser parser = new Parser("images.pdf")) {
    PageAreaOptions options = new PageAreaOptions(new Rectangle(new Point(0, 0), new Size(400, 400)));
    for (PageImageArea image : parser.getImages(options)) {
        System.out.println(image.getPage().getIndex() + ": " + image.getRectangle());
    }
}

Update — licensing on GroupDocs.Foundation

License validation, metered licensing and the licensing of the bundled Aspose components are now performed by GroupDocs.Foundation, the same way as in the other GroupDocs products. The licensing API is unchanged: License.setLicense and Metered.setMeteredKey are called exactly as before. (PARSERJAVA-154)

Other updates

  • Bundled components updated: Aspose.Cells 26.9, Aspose.Email 26.8, Aspose.PDF 26.8.1, Aspose.Slides 26.9, Aspose.Words 26.8 and Aspose.BarCode 26.6. The product still runs on Java 8. (PARSERJAVA-512)
  • The published POM carries the product name, a short description, the product page and declares <organization> and <scm>. Metadata only. (PARSERJAVA-509)

Resources