GroupDocs.Comparison for Java 26.8 Release Notes

Full list of changes in this release

IDSummaryCategory
COMPARISONNET-4726, COMPARISONNET-4727PDF side-by-side comparison view: new PdfCompareOptions with DisplayMode (Inline / SideBySide / Interleaved)Feature
COMPARISONNET-4726New SideBySideResultBuilder: Aspose side-by-side comparer, annotation grouping, page alignment (Needleman-Wunsch over per-page Jaccard similarity), blank-page insertionFeature
COMPARISONNET-4726Comparer.compareSideBySide() — lightweight path comparing only images, annotations and watermarksFeature
COMPARISONNET-4726Side-by-side result: page pairs merged into double-width pages; change rectangles overlaid as SquareAnnotation bordersFeature
COMPARISONNET-4727CompareOptions.compareImagesPdf / imagesInheritanceMode deprecated in favour of PdfCompareOptionsUpdate
COMPARISONNET-4731New PagesSetup option — compare only a page range of a PDFFeature
COMPARISONNET-4767ChangeInfo.row / column / columnHeader populated for Cells comparisonFeature
COMPARISONNET-4769CSV result highlighting: inserted runs wrapped in (...), deleted runs in [...]Feature
COMPARISONNET-4772JSON/text comparison rendered as an inline diff — one <div> per source line, <ins>/<del>/<span> runs in contextFeature
COMPARISONNET-4707, COMPARISONNET-4718PDF footers: a line break is now also detected on an upward Y jump (content stream emitting footer text before body)Fix
COMPARISONNET-4732, COMPARISONNET-4733Corrupted font subsets detected via Font.getBaseFont(); the RemoveUnusedFonts absorber now runs once per document instead of once per fontFix
COMPARISONNET-4748Excel comparison: only string cells get character-run restyling — numeric/error cells (#DIV/0!) are no longer corruptedFix
COMPARISONNET-4751, COMPARISONNET-4763PDF paragraph rendering rewritten: each text segment positioned independently, with font-measured word wrap against the page widthFix
COMPARISONNET-4751Paragraph line spacing measured top-to-top (URY-URY) instead of bottom-to-top, so it no longer includes the line’s own heightFix
COMPARISONNET-4763Tables are now built from Aspose’s own TableAbsorber when it detects them; graphic-operator reconstruction remains the fallbackUpdate
COMPARISONNET-4763Table borders: duplicate black grid over detected source borders removed; phantom white borders no longer drawnFix
COMPARISONNET-4772TextCompareResult: regex post-processing pipeline removed (extractSummaryPageText, processSpans, replaceDeletedAndAddedSpans, applyStyleToElements) — the converter now emits correct markup directlyUpdate
COMPARISONNET-4732ComparisonPdfDocument private constructor no longer allocates a throwaway DocumentUpdate
COMPARISONJAVABinaryFormatter removed: Cells StylesComparer compares raw byte[] only; ComparisonHelper.objectToByteArray() deletedUpdate
COMPARISONJAVAFixed an inherited copy/paste defect in StylesComparer.processDataMethodTag — the target branch was guarded by a sourceValue null-checkFix
COMPARISONNET-4726APITests.pdfDisplayModeTest — Inline 36 / SideBySide 0 / Interleaved 0 changesTest
COMPARISONNET-4731pdfDisplayModeTest extended with PagesSetup(1, 1)Test
COMPARISONNET-4748APITests.cellsTest parameterized; new _div0 case (15 changes) with source_div0.xlsx / target_div0.xlsx fixturesTest
COMPARISONNET-4767TextTests.csvTests — asserts row / column / columnHeader on CSV changes, with new Text/Csv fixturesTest
COMPARISONNET-4773RevisionTests.inputFileStreamLeaveOpen — pins down that a caller-supplied InputStream stays usable after the handler is closedTest
COMPARISONJAVAAPITests.pdfSideBySideWithDifferentPagesCount — exercises page alignment when page counts differ (new target_2pages.pdf)Test
COMPARISONNET-4707Obsolete test_Internal_48 removed from ComparisonParagraphAbsorberTestsTest
COMPARISONJAVAImageCompareTests: DICOM Test9 case disabled (disabled in .NET as well)Test
COMPARISONJAVAAspose.Words 23.8 → 26.3; CompositeNode.getChildNodes()getChildNodes(NodeType.ANY, false), Range.getFields() now throwsUpdate
COMPARISONJAVAAspose.PDF 24.10 → 26.2; TextState.getStrikeOut()isStrikeOut(); stale aspose-pdf:23.4:jdk17 pins removed from the parent POMUpdate
COMPARISONJAVAAspose.Slides 23.3 → 26.2; ISlide.getThumbnail(Dimension)getImage(Dimension) / IImage.save(stream, format)Update
COMPARISONJAVAAspose.CAD 23.1 → 24.6.1; FileFormat is now a real Java enum, DWT constant set remappedUpdate
COMPARISONJAVAAspose.Imaging 23.6 → 25.12; FileFormat.UndefinedFileFormat.UnknownUpdate
COMPARISONJAVAAspose.Cells 23.6 → 26.3, Diagram 23.6 → 25.10, Email 23.5 → 26.1, Tasks 23.1 → 25.9, PSD 21.7 → 25.10, BarCode 23.5 → 25.5 — no source changes requiredUpdate

PDF side-by-side comparison view (COMPARISONNET-4726, COMPARISONNET-4727)

PDF-specific options are now available in a dedicated PdfCompareOptions class (extends CompareOptions). Its DisplayMode controls the layout of the result document:

  • INLINE — default. One merged document; deletions and insertions are highlighted on the same pages. Content from both documents may overlap when they differ significantly.
  • SIDE_BY_SIDE — each result page shows the source page and its matching target page next to each other; deletions on the left, insertions on the right. Content never overlaps.
  • INTERLEAVED — alternating pages: odd pages come from the source (deletions), even pages from the target (insertions). Open the result with “Two Page View” to see each pair together.

In the two non-inline modes, text is compared by Aspose’s side-by-side comparer, so no ChangeInfo objects are produced; images, annotations and watermarks are still compared and marked with rectangle border annotations. Pages are aligned before comparison — when page counts differ, blank pages are inserted at the positions found by a Needleman-Wunsch alignment over per-page word-set similarity. PdfCompareOptions also carries CompareImagesPdf, ImagesInheritanceMode and AnnotationAuthorName; the first two remain on CompareOptions but are deprecated.

Comparing specific PDF pages (COMPARISONNET-4731)

PdfCompareOptions.PagesSetup restricts comparison to a page range. StartPage and EndPage are 1-based and inclusive; either may be left null to mean “from the first page” / “to the last page”. The range is clamped to the actual page count and applied to both documents before any other processing.

Cell location in ChangeInfo (COMPARISONNET-4767)

For Cells comparison (XLSX, CSV, ODS, …) ChangeInfo now reports where the change happened: getRow() and getColumn() return zero-based indices, and getColumnHeader() returns the text of the corresponding column from the first worksheet row when present. All three are null for comparers that do not provide cell coordinates.

CSV result highlighting (COMPARISONNET-4769)

CSV output carries no character styling, so changes could not be seen in the result file. Inserted runs are now wrapped in parentheses and deleted runs in square brackets when the save format is CSV. Other formats are unaffected.

Inline diff for JSON and text (COMPARISONNET-4772)

Text and JSON results are rendered as a true inline diff. The body uses white-space: pre-wrap; every newline in the compared content starts a new <div>, and within a line unchanged, inserted and deleted runs are emitted as sibling <span>, <ins> and <del> elements so changes appear in context. The old rendering — a line-number prefix plus background-coloured spans, followed by a regex pass that rewrote those spans into <ins>/<del> — has been removed entirely.

PDF paragraphs and tables (COMPARISONNET-4751, COMPARISONNET-4763)

Paragraph rendering no longer appends a single TextParagraph and lets Aspose lay it out. The source fragment is built once, its segments are grouped into visual lines using measured segment widths against the available page width, and every segment is then drawn at its own (X, baselineY). This removes both vertical line collapse and horizontal collision between adjacent segments. The wrap budget is the distance from the paragraph’s left edge to the page’s right text boundary, so text spliced in by the diff can exceed the original bounding box and still wrap where it would really wrap.

Table detection now prefers Aspose’s TableAbsorber results and only falls back to reconstructing tables from graphic operators when Aspose finds none. On the rendering side, the default black cell grid is gone — per-cell borders come from the detected source colours, and cells or tables without detected borders draw nothing instead of a white rectangle that was still visible against the page.

Aspose dependency upgrade

Ten Aspose libraries were upgraded. Six needed no source changes at all (Cells, Diagram, Email, Tasks, PSD, BarCode). Four had breaking API changes:

  • Words 26.3CompositeNode.getChildNodes() was removed; all 14 call sites use getChildNodes(NodeType.ANY, false), which returns the same live collection of immediate children of any type. Range.getFields() now declares throws Exception.
  • PDF 26.2TextState.getStrikeOut() renamed to isStrikeOut(). The upgrade also enabled the side-by-side change colours (setDeleteColor / setInsertColor), which the previously pinned 24.10 did not expose.
  • Slides 26.2ISlide.getThumbnail(...) was replaced by getImage(...), returning IImage instead of a BufferedImage. Slide preview generation and slide-to-raster conversion now write straight to the target stream, dropping an intermediate bitmap round-trip.
  • CAD 24.6.1FileFormat changed from long constants to a real Java enum and Image.getFileFormat() returns it. The DWT constant set was renumbered (DwtCadR11DwtCadR1_1, DwtCadR021DwtCadR2_21, DwtCadR012DwtCadR011_012, …) with no documented one-to-one mapping; since all of them denote DWT, the full published set is mapped. As a side effect DwtCadR2000DwtCadR2018 are now recognised as DWT, where before they fell through as undetected.
  • Imaging 25.12FileFormat.Undefined renamed to FileFormat.Unknown.

aspose-pdf 26.2 publishes no jdk17-classified artifact, so the classifier was dropped. That exposed two stale aspose-pdf:23.4:jdk17 declarations in the parent POM which would otherwise have put a second Aspose.PDF version on the classpath; they were removed (the child POM declares the dependency itself).