Latest release (November 2026)

The latest release v26.11 moves the package to the GroupDocs.Comparison for Java 26.11 engine. Images can now be compared by the text recognized in them (OCR). Spreadsheet comparison matches rows by content and takes seconds instead of minutes, text comparison handles words moved across line breaks, and PDF results are laid out from the source page.

Full list of changes in this release

KeyCategorySummary
COMPARISONNODEJSUpdateJava engine updated to GroupDocs.Comparison for Java 26.11
COMPARISONNODEJSFeatureOcrOptions, OcrDisplayMode, OcrLanguage and OcrChangeInfo are exported from the package root
COMPARISONNET-4925, COMPARISONNET-4934FeatureImages can be compared by the text recognized in them (OCR) instead of by their pixels
COMPARISONJAVA-1798, COMPARISONNET-4940, COMPARISONNET-4945FixSpreadsheet rows are matched by content: an inserted or deleted row no longer marks every following row as changed
COMPARISONJAVA-1797, COMPARISONNET-4930FixSpreadsheet comparison takes seconds instead of minutes; faster text diff in every format
COMPARISONJAVA-1796, COMPARISONNET-4946FixXLSX result: rows without their own height stay fitted to their content
COMPARISONNET-4947FixXLSX result: unchanged numbers and dates keep their type instead of becoming text
COMPARISONNET-4944FixStyleSettings.setHighlightColor fills the background of changed spreadsheet cells
COMPARISONNET-4927, COMPARISONNET-4928, COMPARISONNET-4923FixText: words pushed across line breaks are no longer reported as deleted and re-inserted
COMPARISONNET-4403, COMPARISONNET-4891UpdatePDF results are laid out from the source page: components keep their positions, table cells wrap at their own edge
COMPARISONNET-4931FixInline PDF result shows a replaced phrase whole: the old words, then the new ones
COMPARISONNET-4896FixInline PDF result no longer wraps a line that the comparison made slightly longer onto the line below
COMPARISONNET-4763FixPDF result no longer draws a black grid over the table’s own borders
COMPARISONJAVAFixPDF pages drawn through forms (for example, spreadsheets saved as PDF) are no longer taken as unchanged
COMPARISONJAVAFixPDF: lines that contain only spaces are no longer reported as changes
COMPARISONJAVAFixPDF: a table of contents keeps its page numbers on their lines
COMPARISONNET-4926FixWord: a table column or row that became empty is kept in place instead of being deleted and re-inserted
COMPARISONNET-4880FixPresentations: LoadOptions.setSkipExternalResources and setWhitelistedResources now apply
COMPARISONNET-4935FixHTML preview: concurrent previews no longer overwrite each other’s pages; requested pages are honored
COMPARISONJAVA-1794, COMPARISONJAVA-1795UpdateAspose libraries updated: Words 26.8, PDF 26.8.1, Cells 26.9, Slides 26.9, Email 26.8, Diagram 26.9, CAD 26.8, PSD 26.8, BarCode 26.6

Behavior changes to check before upgrading

  • Spreadsheet comparison reports different, and usually far fewer, changes when rows were inserted or deleted, because rows are now matched by content.
  • PDF results are laid out differently: each component stays where it was on the source page.
  • In text and inline PDF results, a replaced word or phrase now reads old first, then new.
  • In evaluation mode, only the first 2 pages of a PDF document are compared.

Major features

Comparing images by recognized text

An image can now be compared by the text that Aspose.OCR recognizes in it, instead of by its pixels. This suits scans, photos and screenshots of documents, where the same text never has the same pixels.

'use strict';

const groupdocs = require('@groupdocs/groupdocs.comparison');

const comparer = new groupdocs.Comparer('source.png');
comparer.add('target.png');

const ocr = new groupdocs.OcrOptions();
ocr.setEnabled(true);
ocr.setDisplayMode(groupdocs.OcrDisplayMode.SIDE_BY_SIDE); // or TEXT

const options = new groupdocs.CompareOptions();
options.setOcr(ocr);

comparer.compare('result.png', options);
  • SIDE_BY_SIDE (default) shows the two images side by side with the changed words boxed. TEXT shows only the recognized text with the changes marked in it.
  • Each change is an OcrChangeInfo with the boxes it covers on both images (getSourceBoxes(), getTargetBoxes()) and the recognition confidence (getConfidence()).
  • setLanguage(OcrLanguage) selects the language or script; the default is LATIN. Other languages need a recognition model that is downloaded on first use.

Spreadsheet comparison

  • Rows and columns are aligned by the content of their cells. Before, a workbook of six rows with one row deleted produced 91 changes; it now produces 8.
  • Comparison of two identical 200 × 20 sheets took 2.5 minutes and now takes under a second. The faster diff is used for Word, PDF and text comparison as well.
  • Rows without an explicit height stay fitted to their content in the result, unchanged numbers and dates keep their type, and StyleSettings.setHighlightColor fills the background of changed cells.

Text and PDF results

  • Words pushed across line breaks by an edit are no longer reported as deleted from one line and inserted into the next.
  • PDF results are laid out the same way as in GroupDocs.Comparison for .NET: images and vector graphics keep their positions, table cells wrap at their own edge, and pages that are the same in both documents are not compared again.

Package

The package is available on npm: @groupdocs/groupdocs.comparison.

npm install @groupdocs/groupdocs.comparison@26.11.0

Public API and backward incompatible changes

The public API matches GroupDocs.Comparison for Java 26.11. New classes: OcrOptions, OcrDisplayMode, OcrLanguage and OcrChangeInfo, and the CompareOptions.setOcr() method. See Behavior changes to check before upgrading.

Feedback

We value your feedback! If you have any questions, issues, or suggestions, feel free to reach out to us through our Free Support Forum. Our team will be happy to assist you and answer any questions you may have.