We’re pleased to announce the release of GroupDocs.Comparison for Java 26.11, available as of November 2026. The headline feature is OCR-based image comparison: images can now be compared by the text recognized in them instead of by their pixels. Spreadsheet comparison gets a major overhaul — rows are matched by content, and comparing large sheets takes seconds instead of minutes. PDF results are now laid out from the source page, the same way as in GroupDocs.Comparison for .NET, and a set of fixes covers text, Word, presentation and HTML preview comparison.
What’s new in this release
| Key | Summary | Category |
|---|---|---|
| COMPARISONNET-4925, COMPARISONNET-4934 | Images can be compared by the text recognized in them (OCR) instead of by their pixels | Feature |
| COMPARISONJAVA-1798, COMPARISONNET-4940, COMPARISONNET-4945 | Spreadsheet rows are matched by content: an inserted or deleted row no longer marks every following row changed | Fix |
| COMPARISONJAVA-1797, COMPARISONNET-4930 | Spreadsheet comparison takes seconds instead of minutes; faster text diff in every format | Fix |
| COMPARISONJAVA-1796, COMPARISONNET-4946 | XLSX result: rows without a height of their own stay fitted to their content | Fix |
| COMPARISONNET-4947 | XLSX result: unchanged numbers and dates keep their type instead of becoming text | Fix |
| COMPARISONNET-4944 | StyleSettings.setHighlightColor fills the background of changed spreadsheet cells |
Fix |
| COMPARISONNET-4927, COMPARISONNET-4928, COMPARISONNET-4923 | Text: words pushed across line breaks are no longer reported deleted and re-inserted | Fix |
| COMPARISONNET-4403, COMPARISONNET-4891 | PDF results laid out from the source page: components at their positions, cells wrap at their own edge | Update |
| COMPARISONNET-4931 | Inline PDF result shows a replaced phrase whole: the old words, then the new ones | Fix |
| COMPARISONNET-4896 | Inline PDF result no longer wraps a line the comparison made slightly longer onto the line below | Fix |
| COMPARISONNET-4763 | PDF result no longer draws a black grid over a table’s own borders | Fix |
| — | PDF pages drawn through forms (spreadsheets saved as PDF) are no longer taken as unchanged | Fix |
| — | PDF: lines of nothing but spaces are no longer reported as changes | Fix |
| — | PDF: a table of contents keeps its page numbers on their lines | Fix |
| COMPARISONNET-4926 | Word: a table column or row that became empty is kept in place instead of deleted and re-inserted | Fix |
| COMPARISONNET-4880 | Presentations: LoadOptions.setSkipExternalResources and setWhitelistedResources now apply |
Fix |
| COMPARISONNET-4935 | HTML preview: concurrent previews no longer overwrite each other’s pages; requested pages are honoured | Fix |
| COMPARISONJAVA-1794, COMPARISONJAVA-1795 | Aspose libraries updated | Update |
Behaviour changes to check before upgrading
- New dependency. The published POM declares a new dependency, Aspose.OCR for Java, used only by OCR comparison. It brings ONNX Runtime with native libraries. If you don’t use OCR, you can exclude it — every other comparison works without it (see How to get the update).
- Spreadsheet changes. When rows were inserted or deleted, spreadsheet comparison reports different — and usually far fewer — changes, because rows are now matched by content.
- PDF layout. PDF results are laid out differently: each component stays where it was on the source page.
- Order of replacements. In text and inline PDF results, a replaced word or phrase now reads old first, then new.
- Evaluation mode. Only the first 2 pages of a PDF are compared in evaluation mode, as in GroupDocs.Comparison for .NET.
New feature: compare images by recognized text (OCR)
An image can now be compared by the text that Aspose.OCR reads in it, instead of by its pixels. This is the right choice for scans, photos and screenshots of documents, where the same text never produces the same pixels — a page re-scanned with a slight shift or at a different quality no longer shows differences everywhere.
try (Comparer comparer = new Comparer("source.png")) {
comparer.add("target.png");
OcrOptions ocr = new OcrOptions();
ocr.setEnabled(true);
ocr.setDisplayMode(OcrDisplayMode.SIDE_BY_SIDE); // or TEXT
CompareOptions options = new CompareOptions();
options.setOcr(ocr);
comparer.compare("result.png", options);
for (ChangeInfo change : comparer.getChanges()) {
OcrChangeInfo ocrChange = (OcrChangeInfo) change;
System.out.println(change.getText() + ": confidence " + ocrChange.getConfidence()
+ ", " + ocrChange.getSourceBoxes().length + " box(es) on the source");
}
}
What you can control:
- Display mode.
SIDE_BY_SIDE(default) shows the two images side by side with the changed words boxed.TEXTshows only the recognized text, with the changes marked in it. - Change details. Each change is an
OcrChangeInfowith the boxes it covers on both images (getSourceBoxes(),getTargetBoxes()) and the recognition confidence (getConfidence()). The boxes are empty inTEXTmode. - Language.
setLanguage(OcrLanguage)selects the language or script; the default isLATIN. Other languages need a recognition model that is downloaded on first use.setDisableResourceDownloads(true)andsetResourcesPath(String)restrict recognition to models already on disk.
Aspose.OCR for Java must be on the classpath. It is a dependency of the published POM, not part of the jar. Without it, an OCR comparison fails with a message that names the missing library.
Spreadsheet comparison
Rows matched by content
Previously, rows were paired with the row at the same index in the other workbook. When a row was inserted or deleted, every row after it was reported as rewritten. For example, a workbook of six rows with one of them deleted produced 91 changes; it now produces 8 — the six cells of the deleted row, marked in place, and the row count on the summary sheet.
Rows and columns are now aligned by the content of their cells. Rows that are the same in both files are paired directly, and only what lies between them is aligned. The number of changes reported for such files differs from earlier versions.
Seconds instead of minutes
Spreadsheet comparison could take minutes even for identical files: two identical 200 × 20 sheets took 2.5 minutes. They now take under a second (a few seconds for the first comparison after the JVM starts), and a 400 × 20 sheet with one row deleted takes about 7 seconds.
The word diff behind every comparison was reworked and returns the same result as before, only much faster — so Word, PDF and text comparison benefit too. Identical rows and columns are paired without scoring, so two identical sheets are not aligned at all.
Row heights, number types and highlight colour
- Rows without a height of their own are now left to fit their content in the result, so wrapped and large-font cells are no longer clipped. Rows with an explicit height keep it.
- Unchanged numbers and dates keep their type instead of being written back as text. Formula cells are still written with their calculated values.
StyleSettings.setHighlightColornow fills the background of changed cells:
StyleSettings deleted = new StyleSettings();
deleted.setHighlightColor(Color.PINK);
CompareOptions options = new CompareOptions();
options.setDeletedItemStyle(deleted);
PDF results
Layout from the source page
The PDF engine now lays out results the same way as GroupDocs.Comparison for .NET:
- every component of the result stands where it was on the source page; images are placed at their own coordinates, and the page’s vector graphics are carried over;
- a table draws its grid, and the text of each cell wraps at the cell’s own edge, including merged cells;
- lines are grouped into paragraphs by the distance between baselines, and page margins come from the page itself;
- pages that are the same in both documents are found anywhere in the document, not only at the start, and are not compared again.
Results look different from earlier versions. Deleted content is drawn where it stood on the source page; where the target has other content in that place, the two can overlap.
Smaller fixes
- Replaced phrases. A replacement of several words was drawn one pair at a time, so “Richard McClintock” becoming “Vasily Pupkin” read “Vasily Richard Pupkin McClintock”. The inline result now shows the old phrase, then the new one.
- Lines made slightly longer. In an inline result, a line that a replacement made one word longer no longer wraps its last word onto a line of its own over the next line.
- Table grids. A table border whose colour could not be detected is no longer painted black over the source’s own borders.
- Pages drawn through forms. Pages that draw everything through forms, as a spreadsheet saved as PDF does, were taken as unchanged. The forms are now compared too, so their changes are reported.
- Blank lines. Lines holding nothing but spaces are no longer reported as changes.
- Tables of contents. The page number of a changed table of contents line stays on its line.
Other fixes
Text across line breaks
An edit that lengthens or shortens a line of a text file pushes words across the line breaks after it. Compared line by line, those words were reported deleted from one line and inserted into the next. Lines are now joined while that gives fewer changes, compared as one run and laid back out on the target’s lines. A replacement is reported old first, then new, and the HTML view of a text comparison applies accepted and rejected changes the same way as the text result. Comparing one file with several targets still compares line by line.
Word: emptied table column or row
When a column or row of a table became empty, it was reported as deleted and an empty one as inserted, and the cells after it shifted. It now stays in place, with its content reported as deleted.
Presentations: external resources
LoadOptions.setSkipExternalResources and setWhitelistedResources, added in 26.10, had no effect on presentations. They now apply to presentations as to Word and HTML documents, and the result presentation never fetches external resources. A picture that was not loaded is compared as an empty picture.
HTML preview
Preview pages of an HTML document were rendered to fixed file names in the temp directory, so two previews at once overwrote each other’s pages and the requested page numbers were ignored. Pages are now rendered in memory, only the requested ones are returned, and they are rendered on white instead of a transparent background.
Aspose libraries updated
| Library | Before | Now |
|---|---|---|
| Aspose.BarCode | 25.5 | 26.6 |
| Aspose.CAD | 24.6.1 | 26.8 |
| Aspose.Cells | 26.3 | 26.9 |
| Aspose.Diagram | 25.7 | 26.9 |
| Aspose.Email | 26.1 | 26.8 |
| Aspose.PDF | 26.2 | 26.8.1 |
| Aspose.PSD | 25.10 | 26.8 |
| Aspose.Slides | 26.2 | 26.9 |
| Aspose.Words | 26.3 | 26.8 |
The libraries are bundled in the jar as before. Aspose.OCR 26.10.0 is new and comes as a dependency in the POM.
How to get the update
Maven
Add the GroupDocs repository and the dependency to your pom.xml:
<repositories>
<repository>
<id>groupdocs-artifacts-repository</id>
<name>GroupDocs Artifacts Repository</name>
<url>https://releases.groupdocs.com/java/repo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-comparison</artifactId>
<version>26.11</version>
</dependency>
</dependencies>
If you don’t use OCR comparison, you can exclude Aspose.OCR and its native libraries:
<dependency>
<groupId>com.groupdocs</groupId>
<artifactId>groupdocs-comparison</artifactId>
<version>26.11</version>
<exclusions>
<exclusion>
<groupId>com.aspose</groupId>
<artifactId>aspose-ocr</artifactId>
</exclusion>
</exclusions>
</dependency>
Direct download
Download the JAR from the GroupDocs.Comparison for Java 26.11 download page.