GroupDocs.Comparison 24.11.0

dotnet add package GroupDocs.Comparison --version 24.11.0                
NuGet\Install-Package GroupDocs.Comparison -Version 24.11.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GroupDocs.Comparison" Version="24.11.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GroupDocs.Comparison --version 24.11.0                
#r "nuget: GroupDocs.Comparison, 24.11.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GroupDocs.Comparison as a Cake Addin
#addin nuget:?package=GroupDocs.Comparison&version=24.11.0

// Install GroupDocs.Comparison as a Cake Tool
#tool nuget:?package=GroupDocs.Comparison&version=24.11.0                

Document Comparison .NET API

Package version Package downloads.NET

banner

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

On-premise library to compare documents in applications based on .NET platform. Retrieve the list of changes in the desired format with a line-by-line comparison of content, paragraphs, characters, styles, shapes, and position.

Please note: our library implies the use of .NET programming languages, compatible with CLI infrastructure. For Node.js, Java and Python languages, we recommend you get GroupDocs.Comparison for Node.js, GroupDocs.Comparison for Java and GroupDocs.Comparison for Python, respectively.

Document Comparison Features

Supported Microsoft Office Formats

Microsoft Word: DOC, DOCM, DOCX, DOT, DOTM, DOTX
Microsoft Excel: XLS, XLT, XLSX, XLTM, XLSB, XLSM, XLSX, CSV
Microsoft PowerPoint: POT, POTX, PPS, PPSX, PPTX, PPT
Microsoft OneNote: ONE
Microsoft Visio: VSDX, VSD, VSS, VST, VDX

Other Supported Formats

OpenDocument: ODT, ODP, OTP, ODS, OTT
Fixed Layout: PDF
AutoCAD: DWG, DXF
Email: EML, EMLX, MSG
Images: BMP, GIF, JPG, JPEG, PNG
Web: HTM, HTML, MHT, MHTML
Text: RTF, TXT
eBook: MOBI, DjVu
Medical Imaging: DCM
Programming Language: CS, JAVA, CPP, JS, PY, RB

Develop & Deploy GroupDocs.Comparison Anywhere

Microsoft Windows: Windows Azure, Microsoft Windows Desktop (x86, x64), Microsoft Windows Server (x86, x64)
macOS: Mac OS X
Linux: Ubuntu, OpenSUSE, CentOS, and others
Development Environments: Microsoft Visual Studio (2010 & up), Xamarin.Android, Xamarin.IOS, Xamarin.Mac, MonoDevelop 2.4 and later
Supported Frameworks: .NET Standard 2.0, .NET Framework 2.0 or higher, .NET Core 2.0 or higher, Mono Framework 1.2 or higher

Get Started

Are you ready to give GroupDocs.Comparison for .NET a try? Simply execute Install-Package GroupDocs.Comparison from Package Manager Console in Visual Studio to fetch & reference GroupDocs.Comparison assembly in your project. If you already have GroupDocs.Comparison for .NET and want to upgrade it, please execute Update-Package GroupDocs.Comparison to get the latest version.

Compare PDF Files in C# Code

// Specify the source document
using (Comparer comparer = new Comparer("source.pdf"))
{
    // Add one or more target documents
    comparer.Add("target.pdf");

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

Compare JSON Files and get list of changes via C#

// Initialize the comparer with the source JSON file
using (Comparer comparer = new Comparer("source.json"))
{
    // Add the target JSON file for comparison
    comparer.Add("target.json");

    // Compare the files (changes are tracked internally)
    comparer.Compare();

    // Retrieve the list of changes between the source and target files
    ChangeInfo[] changes = comparer.GetChanges();

    // Iterate through each change and display its details
    foreach (ChangeInfo change in changes)
        Console.WriteLine("Change Type: {0}, Change ID: {1}, Text: {2}", 
            change.Type, 
            change.Id, 
            change.Text
        );
}

Get file info for the DOCX file with C#

// Initialize the comparer with the source DOCX file
using (Comparer comparer = new Comparer("source.docx"))
{
    // Retrieve document metadata such as page count and size
    IDocumentInfo info = comparer.Source.GetDocumentInfo();

    // Iterate through each page to display detailed information
    for (int i = 0; i < info.PageCount; i++)
    {
        Console.WriteLine("\n" +
            "Page number: {5}\n" +              // Current page number
            "File type: {0}\n" +                // Type of the file
            "Number of pages: {1}\n" +          // Total page count
            "Document size: {2} bytes\n" +      // File size in bytes
            "Width: {3}\n" +                    // Width of the current page
            "Height: {4} ",                     // Height of the current page
            info.FileType, 
            info.PageCount, 
            info.Size, 
            info.PagesInfo[i].Width, 
            info.PagesInfo[i].Height, 
            i + 1                               // Adjust page index to 1-based numbering
        );
    }
}

Compare PNG Files using C# and customize changes styles

// Initialize the comparer with the source PNG file
using (Comparer comparer = new Comparer("source.png"))
{
    // Add the target PNG file for comparison
    comparer.Add("target.png");

    // Define custom styles for inserted and deleted items
    CompareOptions compareOptions = new CompareOptions()
    {
        InsertedItemStyle = new StyleSettings()
        {
            // Highlight inserted items in green
            HighlightColor = System.Drawing.Color.Green,
            FontColor = System.Drawing.Color.Green,
        },
        DeletedItemStyle = new StyleSettings()
        {
            // Highlight deleted items in red
            HighlightColor = System.Drawing.Color.Red,
            FontColor = System.Drawing.Color.Red,
        }
    };

    // Perform the comparison and save the result with the customized styles
    comparer.Compare("result.png", compareOptions);
}

Product Page | Docs | Demos | API Reference | Examples | Blog | Releases | Free Support | Temporary License

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on GroupDocs.Comparison:

Package Downloads
GroupDocs.Comparison.UI.Api

GroupDocs.Comparison.UI.Api containing base API features required by GroupDocs.Comparison.UI see https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-.NET-UI for more details.

GroupDocs.Comparison.UI.SelfHost.Api

GroupDocs.Comparison.UI.SelfHost.Api containing API implementation that is based on GroupDocs.Comparison for .NET see https://github.com/groupdocs-comparison/GroupDocs.Comparison-for-.NET-UI for more details.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
24.11.0 2,944 11/29/2024
24.10.0 3,589 10/31/2024
24.9.0 4,425 9/30/2024
24.8.0 4,643 8/30/2024
24.7.0 3,075 7/30/2024
24.6.0 14,614 6/28/2024
24.5.0 2,581 5/31/2024
24.4.0 7,483 4/30/2024
24.3.0 16,887 3/29/2024
24.2.0 5,942 2/29/2024
24.1.0 3,153 1/31/2024
23.12.0 5,673 12/15/2023
23.11.0 7,572 11/27/2023
23.10.0 10,410 10/31/2023
23.9.0 54,059 9/25/2023
23.8.0 12,905 8/31/2023
23.6.0 16,459 6/30/2023
23.4.0 24,341 4/27/2023
23.3.0 23,554 3/15/2023
23.1.0 55,684 1/26/2023
22.11.0 22,238 12/1/2022
22.10.0 16,973 10/28/2022
22.8.0 18,653 8/19/2022
22.6.0 21,819 6/22/2022
22.4.0 281,503 5/3/2022
22.3.0 39,700 3/31/2022
22.1.0 21,429 1/31/2022
21.12.0 11,032 12/22/2021
21.11.0 9,334 11/30/2021
21.10.0 11,635 10/29/2021
21.9.0 10,187 9/30/2021
21.8.0 23,082 9/1/2021
21.7.0 15,532 7/30/2021
21.6.0 9,802 6/30/2021
21.5.0 11,954 5/31/2021
21.4.0 3,832 4/30/2021
21.3.0 9,930 3/31/2021
21.2.0 62,485 2/26/2021
21.1.0 4,009 1/29/2021
20.12.0 40,091 12/21/2020
20.11.0 3,433 11/30/2020
20.10.0 28,752 10/30/2020
20.9.0 24,611 9/30/2020
20.8.0 24,644 8/31/2020
20.7.0 24,806 7/31/2020
20.6.0 55,328 6/26/2020
20.5.0 40,115 5/29/2020
20.4.2 25,927 5/12/2020
20.4.1 23,976 4/30/2020
20.4.0 3,462 4/30/2020
20.3.1 24,283 4/6/2020
20.3.0 3,376 3/31/2020
20.2.0 41,513 2/28/2020
20.1.0 27,002 1/28/2020
19.12.0 38,325 12/20/2019
19.11.0 37,383 11/29/2019
19.10.0 3,980 10/28/2019
19.9.1 2,745 10/16/2019
19.9.0 2,495 9/17/2019
19.6.0 3,700 6/27/2019
19.5.0 2,880 5/23/2019
19.3.1 3,265 3/21/2019
19.3.0 2,570 3/18/2019
19.1.0 3,708 1/25/2019
18.11.0 3,423 12/4/2018
18.10.0 2,621 11/5/2018
18.9.0 2,758 10/4/2018
18.8.0 2,920 8/31/2018
18.7.1 2,600 8/6/2018
18.7.0 2,728 7/23/2018
18.6.0 2,739 6/15/2018
18.5.0 3,035 5/17/2018
18.4.0 3,582 4/18/2018
18.3.0 2,850 3/9/2018
18.2.0 2,878 2/8/2018
18.1.0 2,773 1/16/2018
17.12.0 2,799 12/7/2017
17.11.0 2,759 11/1/2017
17.10.0 2,734 10/2/2017