1
GroupDocs.Comparison for .NET
GroupDocs.Comparison for .NET is a standalone library, middleware, designed to perform a comparison process
between two documents of the same type, detect all differences (changes) between them and apply or dismiss each
difference for the resulting document. GroupDocs.Comparison for .NET is a standard .NET assembly, written with
1
00% managed code, and it can be used in any .NET project with any CLR-compatible language.
However the main feature of the GroupDocs.Comparison for .NET is focusing on the web applications — the library
delivers special API methods and web interface for the ASP.NET projects. You can perform comparison and display its
result on a web-page using a couple lines of code.
In this article and demo project project I’ll explain you, how the GroupDocs.Comparison for .NET works and how it
can be used in the real project.
Main destination and basics of the GroupDocs.Comparison for .NET
As it was told above, GroupDocs.Comparison for .NET performs a comparison between two documents of the same
type. You specify a source and a target document, and start a comparison process. I want to focus your attention —
input documents are not equivalent and interchangeable — there is a source document, which is considered by the
GroupDocs.Comparison for .NET as a “base”, or “root”, and the target document, which is considering as a some sort
of “alternative version”. When comparing, GroupDocs.Comparison for .NET detects all differences, which are present
in the source document and absent in the target document, and vice versa.
Depending on a document type, GroupDocs.Comparison for .NET can detect not only content-related differences,
but also document structure changes and style changes. Enumeration “Groupdocs.Comparison.Common.
ChangeType” contains all possible types of differences, which can be processed by the GroupDocs.Comparison for
.NET.
But document comparison is not the only feature of the GroupDocs.Comparison for .NET — it also can perform a
merge between two documents. When comparison is ready, GroupDocs.Comparison for .NET prepares a set of all
detected differences. You can leave, apply or discard every single difference, and generate a new document, which
will be based on this manipulation.
For ASP.NET (WebForms and MVC version 3+ are supported) GroupDocs.Comparison for .NET contains a special
widget. You place it on a web-page, and when rendering a page, this widget transforms to the web-content, where
result document is displayed; this page also contains a web GUI, which allows you to perform further document
manipulation.
All of these will be shown below.
Requirements
GroupDocs.Comparison for .NET is a .NET assembly, so it requires an installed .NET Framework version 4.0 or higher.
In order to use it in the ASP.NET application, you should have installed ASP.NET WebForms and ASP.NET MVC version
3
or higher. When using in the ASP.NET application, GroupDocs.Comparison for .NET also requires
System.Web.Optimization.dll version 1.1.0.0 and WebGrease.dll version 1.6.5135.21930. All these libraries are
present in the sample project.
Of course, you need to have a web-server in order to run the sample project. You can open it using MS Visual Studio
2
012 or above and run it using the IIS Express or you can create a web-site using the IIS Manager and run it under the