Compare Legal Documents
Compare legal documents in C#
The Microsoft Word comparison features may be not enough to compare contracts and legal documents. Suppose you need your own way to implement comparison logic or you are developing your own app. The GroupDocs.Comparison (which is a part of Conholdate.Total for .NET) gives the ability to compare documents programmatically and manage found differences in code for wide range of supported file formats. Here is an example of how to compare two contracts using GroupDocs.Comparsion API. You just have to follow these steps
- Instantiate Comparer objec with source document path or stream.
- Call Add method and specify target document path or stream.
- Call Compare method.
Let’s say you have two contracts in DOCX format that were concluded in different years (For example, for 2018 and 2019). Now you are going to compare how the conditions have changed after some time.
|Source File - Contract signed in 2018|
|Target File- Contract signed in 2019|
Here is the code that is used to compare two contracts.
As a result, we get a DOCX file where the deleted elements are marked in red, the added – in blue, and the modified – in green.
For more details you can visit this article.