Free Support Forum - groupdocs.com

Word documents comparison using comparison settings in .NET

Hello Support

Will it be possible to use groupdocs.comparison with .net 2.0?
Do I need any different dll or can use dll from zip itself?

Example to compare two word documents using file path and comparesettings where in stylechange set to false will be great.

I tried to use examples from https://docs.groupdocs.com/display/comparisonnet/Home

However some the objects like WordsComparisonSettings seems to be not available with 2.0, This is my guess.

Thanks in advance.
Mandar

@mandarln

Yes, have a look at the system requirements.
We’ve simplified and improved the document comparison experience in version 20.5. Please have a look at the new code:

using (Comparer comparer = new Comparer(“source.docx”))
{
    comparer.Add(“target.docx”);
    comparer.Compare(“result.docx”);
}

Comparer class introduced as a single entry point to compare documents of any supported file format with various options and ability to accept/reject found differences in resultant document.

Below is the code to set comparison options/settings:

CompareOptions compareOptions = new CompareOptions()
{
     InsertedItemStyle = new StyleSettings()
     {
         FontColor = System.Drawing.Color.Yellow
     }
};

Please have a look at the documentation and example project.