GroupDocs.Comparison for Java 26.8 Release Notes
Full list of changes in this release
| ID | Summary | Category |
|---|---|---|
| COMPARISONNET-4726, COMPARISONNET-4727 | PDF side-by-side comparison view: new PdfCompareOptions with DisplayMode (Inline / SideBySide / Interleaved) | Feature |
| COMPARISONNET-4726 | New SideBySideResultBuilder: Aspose side-by-side comparer, annotation grouping, page alignment (Needleman-Wunsch over per-page Jaccard similarity), blank-page insertion | Feature |
| COMPARISONNET-4726 | Comparer.compareSideBySide() — lightweight path comparing only images, annotations and watermarks | Feature |
| COMPARISONNET-4726 | Side-by-side result: page pairs merged into double-width pages; change rectangles overlaid as SquareAnnotation borders | Feature |
| COMPARISONNET-4727 | CompareOptions.compareImagesPdf / imagesInheritanceMode deprecated in favour of PdfCompareOptions | Update |
| COMPARISONNET-4731 | New PagesSetup option — compare only a page range of a PDF | Feature |
| COMPARISONNET-4767 | ChangeInfo.row / column / columnHeader populated for Cells comparison | Feature |
| COMPARISONNET-4769 | CSV result highlighting: inserted runs wrapped in (...), deleted runs in [...] | Feature |
| COMPARISONNET-4772 | JSON/text comparison rendered as an inline diff — one <div> per source line, <ins>/<del>/<span> runs in context | Feature |
| COMPARISONNET-4707, COMPARISONNET-4718 | PDF footers: a line break is now also detected on an upward Y jump (content stream emitting footer text before body) | Fix |
| COMPARISONNET-4732, COMPARISONNET-4733 | Corrupted font subsets detected via Font.getBaseFont(); the RemoveUnusedFonts absorber now runs once per document instead of once per font | Fix |
| COMPARISONNET-4748 | Excel comparison: only string cells get character-run restyling — numeric/error cells (#DIV/0!) are no longer corrupted | Fix |
| COMPARISONNET-4751, COMPARISONNET-4763 | PDF paragraph rendering rewritten: each text segment positioned independently, with font-measured word wrap against the page width | Fix |
| COMPARISONNET-4751 | Paragraph line spacing measured top-to-top (URY-URY) instead of bottom-to-top, so it no longer includes the line’s own height | Fix |
| COMPARISONNET-4763 | Tables are now built from Aspose’s own TableAbsorber when it detects them; graphic-operator reconstruction remains the fallback | Update |
| COMPARISONNET-4763 | Table borders: duplicate black grid over detected source borders removed; phantom white borders no longer drawn | Fix |
| COMPARISONNET-4772 | TextCompareResult: regex post-processing pipeline removed (extractSummaryPageText, processSpans, replaceDeletedAndAddedSpans, applyStyleToElements) — the converter now emits correct markup directly | Update |
| COMPARISONNET-4732 | ComparisonPdfDocument private constructor no longer allocates a throwaway Document | Update |
| COMPARISONJAVA | BinaryFormatter removed: Cells StylesComparer compares raw byte[] only; ComparisonHelper.objectToByteArray() deleted | Update |
| COMPARISONJAVA | Fixed an inherited copy/paste defect in StylesComparer.processDataMethodTag — the target branch was guarded by a sourceValue null-check | Fix |
| COMPARISONNET-4726 | APITests.pdfDisplayModeTest — Inline 36 / SideBySide 0 / Interleaved 0 changes | Test |
| COMPARISONNET-4731 | pdfDisplayModeTest extended with PagesSetup(1, 1) | Test |
| COMPARISONNET-4748 | APITests.cellsTest parameterized; new _div0 case (15 changes) with source_div0.xlsx / target_div0.xlsx fixtures | Test |
| COMPARISONNET-4767 | TextTests.csvTests — asserts row / column / columnHeader on CSV changes, with new Text/Csv fixtures | Test |
| COMPARISONNET-4773 | RevisionTests.inputFileStreamLeaveOpen — pins down that a caller-supplied InputStream stays usable after the handler is closed | Test |
| COMPARISONJAVA | APITests.pdfSideBySideWithDifferentPagesCount — exercises page alignment when page counts differ (new target_2pages.pdf) | Test |
| COMPARISONNET-4707 | Obsolete test_Internal_48 removed from ComparisonParagraphAbsorberTests | Test |
| COMPARISONJAVA | ImageCompareTests: DICOM Test9 case disabled (disabled in .NET as well) | Test |
| COMPARISONJAVA | Aspose.Words 23.8 → 26.3; CompositeNode.getChildNodes() → getChildNodes(NodeType.ANY, false), Range.getFields() now throws | Update |
| COMPARISONJAVA | Aspose.PDF 24.10 → 26.2; TextState.getStrikeOut() → isStrikeOut(); stale aspose-pdf:23.4:jdk17 pins removed from the parent POM | Update |
| COMPARISONJAVA | Aspose.Slides 23.3 → 26.2; ISlide.getThumbnail(Dimension) → getImage(Dimension) / IImage.save(stream, format) | Update |
| COMPARISONJAVA | Aspose.CAD 23.1 → 24.6.1; FileFormat is now a real Java enum, DWT constant set remapped | Update |
| COMPARISONJAVA | Aspose.Imaging 23.6 → 25.12; FileFormat.Undefined → FileFormat.Unknown | Update |
| COMPARISONJAVA | Aspose.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 required | Update |
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.3 —
CompositeNode.getChildNodes()was removed; all 14 call sites usegetChildNodes(NodeType.ANY, false), which returns the same live collection of immediate children of any type.Range.getFields()now declaresthrows Exception. - PDF 26.2 —
TextState.getStrikeOut()renamed toisStrikeOut(). The upgrade also enabled the side-by-side change colours (setDeleteColor/setInsertColor), which the previously pinned 24.10 did not expose. - Slides 26.2 —
ISlide.getThumbnail(...)was replaced bygetImage(...), returningIImageinstead of aBufferedImage. Slide preview generation and slide-to-raster conversion now write straight to the target stream, dropping an intermediate bitmap round-trip. - CAD 24.6.1 —
FileFormatchanged fromlongconstants to a real Java enum andImage.getFileFormat()returns it. The DWT constant set was renumbered (DwtCadR11→DwtCadR1_1,DwtCadR021→DwtCadR2_21,DwtCadR012→DwtCadR011_012, …) with no documented one-to-one mapping; since all of them denote DWT, the full published set is mapped. As a side effectDwtCadR2000–DwtCadR2018are now recognised as DWT, where before they fell through as undetected. - Imaging 25.12 —
FileFormat.Undefinedrenamed toFileFormat.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).