GroupDocs.Comparison for .NET 26.4 Release Notes

GroupDocs.Comparison version 26.4 focuses on significant improvements to PDF document comparison, introducing new display modes, page range filtering, and a dedicated PDF options class.

Full list of changes in this release

KeyCategorySummary
COMPARISONNET-4732EnhancementOptimized comparison performance for PDF documents
COMPARISONNET-4707BugPdf with tables cause exception during processing
COMPARISONNET-4733BugFixed embedded fonts handling logic in PDF comparison
COMPARISONNET-4725FeatureAbility to produce side by side PDF comparison result
COMPARISONNET-4731FeatureAbility to specify pages range for PDF documents comparison

Major Features

⭐ Ability to produce side by side PDF comparison result

Two new display modes have been added to the new PdfCompareOptions class via the ComparisonDisplayMode enum:

  • SideBySide – each result page shows the source and target pages side by side. Deletions appear on the left (source side) and insertions on the right (target side). Content from the two documents never overlaps, making this mode ideal when documents differ heavily.
  • Interleaved – produces a document with alternating pages: odd-numbered pages come from the source document (showing deletions) and even-numbered pages from the target document (showing insertions). Open the result in a PDF viewer with “Two Page View” to see each source/target pair side by side.

Note: The previous default behavior (a single merged document with highlighted insertions and deletions) is preserved as ComparisonDisplayMode.Inline and remains the default value.

Ability to specify pages range for PDF documents comparison

You can now limit PDF comparison to a specific range of pages using the PagesSetup property on PdfCompareOptions. When not set, all pages are compared as before.

using (var comparer = new Comparer("source.pdf"))
{
    comparer.Add("target.pdf");

    var options = new PdfCompareOptions()
    {
        CompareImagesPdf = true,
        DisplayMode = PdfCompareOptions.ComparisonDisplayMode.SideBySide,
        PagesSetup = new PagesSetup()
        {
            StartPage = 3,
            EndPage = 10
        }
    };

    comparer.Compare("result.pdf", options);
}

Public API changes

A new PdfCompareOptions class has been introduced for PDF-specific comparison configuration, following the same pattern as WordCompareOptions introduced in version 26.2.

  • PdfCompareOptions (namespace GroupDocs.Comparison.Options)

  • PdfCompareOptions.ComparisonDisplayMode enum values:

    • Inline (default) – legacy behavior; single merged PDF with deleted content highlighted in one color and inserted content in another. Content from both documents coexists on the same pages.
    • SideBySide (new) – source and target pages appear side by side on each result page; no content overlap.
    • Interleaved (new) – alternating source/target pages; best viewed in a “Two Page View” PDF reader.