GroupDocs.Comparison
24.11.0
dotnet add package GroupDocs.Comparison --version 24.11.0
NuGet\Install-Package GroupDocs.Comparison -Version 24.11.0
<PackageReference Include="GroupDocs.Comparison" Version="24.11.0" />
paket add GroupDocs.Comparison --version 24.11.0
#r "nuget: GroupDocs.Comparison, 24.11.0"
// 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
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
- Compare and detect differences among similar documents.
- Support for 55+ popular document formats from various categories.
- Visual separation of detected changes with the ability to accept or reject modifications.
- Generate document preview.
- Compare paragraph, word as well as characters.
- Identify content styling and formatting changes.
- Set metadata from the source, target files or keep it user-defined.
- Make the resultant document password protected.
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 | Versions 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. |
-
.NETFramework 4.6.2
- System.Drawing.Common (>= 5.0.3)
- System.Text.Encoding.CodePages (>= 5.0.0)
-
.NETStandard 2.1
- Microsoft.Extensions.DependencyModel (>= 2.0.4)
- Microsoft.Win32.Registry (>= 4.7.0)
- SkiaSharp (>= 2.88.3)
- SkiaSharp.NativeAssets.Linux.NoDependencies (>= 2.88.3)
- System.Diagnostics.PerformanceCounter (>= 4.5.0)
- System.Drawing.Common (>= 6.0.0)
- System.Reflection.Emit (>= 4.7.0)
- System.Reflection.Emit.ILGeneration (>= 4.7.0)
- System.Security.Cryptography.Pkcs (>= 4.7.0)
- System.Security.Permissions (>= 4.5.0)
- System.Text.Encoding.CodePages (>= 7.0.0)
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 | 3,453 | 11/29/2024 |
24.10.0 | 3,645 | 10/31/2024 |
24.9.0 | 4,532 | 9/30/2024 |
24.8.0 | 4,643 | 8/30/2024 |
24.7.0 | 3,075 | 7/30/2024 |
24.6.0 | 14,859 | 6/28/2024 |
24.5.0 | 2,582 | 5/31/2024 |
24.4.0 | 7,508 | 4/30/2024 |
24.3.0 | 17,158 | 3/29/2024 |
24.2.0 | 6,071 | 2/29/2024 |
24.1.0 | 3,178 | 1/31/2024 |
23.12.0 | 5,673 | 12/15/2023 |
23.11.0 | 7,573 | 11/27/2023 |
23.10.0 | 10,410 | 10/31/2023 |
23.9.0 | 54,796 | 9/25/2023 |
23.8.0 | 12,905 | 8/31/2023 |
23.6.0 | 16,488 | 6/30/2023 |
23.4.0 | 24,557 | 4/27/2023 |
23.3.0 | 23,640 | 3/15/2023 |
23.1.0 | 56,218 | 1/26/2023 |
22.11.0 | 22,243 | 12/1/2022 |
22.10.0 | 16,973 | 10/28/2022 |
22.8.0 | 18,653 | 8/19/2022 |
22.6.0 | 21,852 | 6/22/2022 |
22.4.0 | 281,724 | 5/3/2022 |
22.3.0 | 39,832 | 3/31/2022 |
22.1.0 | 21,429 | 1/31/2022 |
21.12.0 | 11,120 | 12/22/2021 |
21.11.0 | 9,334 | 11/30/2021 |
21.10.0 | 11,635 | 10/29/2021 |
21.9.0 | 10,188 | 9/30/2021 |
21.8.0 | 23,169 | 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,497 | 2/26/2021 |
21.1.0 | 4,009 | 1/29/2021 |
20.12.0 | 40,100 | 12/21/2020 |
20.11.0 | 3,433 | 11/30/2020 |
20.10.0 | 28,752 | 10/30/2020 |
20.9.0 | 24,635 | 9/30/2020 |
20.8.0 | 24,654 | 8/31/2020 |
20.7.0 | 24,822 | 7/31/2020 |
20.6.0 | 55,359 | 6/26/2020 |
20.5.0 | 40,131 | 5/29/2020 |
20.4.2 | 25,943 | 5/12/2020 |
20.4.1 | 23,998 | 4/30/2020 |
20.4.0 | 3,478 | 4/30/2020 |
20.3.1 | 24,304 | 4/6/2020 |
20.3.0 | 3,392 | 3/31/2020 |
20.2.0 | 41,556 | 2/28/2020 |
20.1.0 | 27,018 | 1/28/2020 |
19.12.0 | 38,341 | 12/20/2019 |
19.11.0 | 37,399 | 11/29/2019 |
19.10.0 | 3,996 | 10/28/2019 |
19.9.1 | 2,754 | 10/16/2019 |
19.9.0 | 2,504 | 9/17/2019 |
19.6.0 | 3,709 | 6/27/2019 |
19.5.0 | 2,889 | 5/23/2019 |
19.3.1 | 3,274 | 3/21/2019 |
19.3.0 | 2,573 | 3/18/2019 |
19.1.0 | 3,716 | 1/25/2019 |
18.11.0 | 3,423 | 12/4/2018 |
18.10.0 | 2,622 | 11/5/2018 |
18.9.0 | 2,767 | 10/4/2018 |
18.8.0 | 2,929 | 8/31/2018 |
18.7.1 | 2,616 | 8/6/2018 |
18.7.0 | 2,744 | 7/23/2018 |
18.6.0 | 2,755 | 6/15/2018 |
18.5.0 | 3,051 | 5/17/2018 |
18.4.0 | 3,598 | 4/18/2018 |
18.3.0 | 2,858 | 3/9/2018 |
18.2.0 | 2,886 | 2/8/2018 |
18.1.0 | 2,781 | 1/16/2018 |
17.12.0 | 2,807 | 12/7/2017 |
17.11.0 | 2,767 | 11/1/2017 |
17.10.0 | 2,742 | 10/2/2017 |