GroupDocs.Comparison for .NET 24.2 Release Notes

Full list of changes in this release

KeyCategorySummary
COMPARISONNET-3823FeatureImplement returning comparison result as an Object
COMPARISONNET-3870FixComparing Word documents with bullet lists with specific styling crashes

Major Features

Below is the list of most notable changes in release of GroupDocs.Comparison for .NET 24.2:

  • Fixed Comparison crash in Word documents with bullet lists with specific styling
  • Implemented returning comparison result as Comparison Document object

Getting comparison results as an object model

Starting from version 24.2, we’ve introduced the ability to obtain the comparison result document as a GroupDocs.Comparison.Document object. This feature allows you to access and manipulate the resulting document programmatically. For instance, you can use it to create new documents using Aspose libraries of corresponding formats and then use them as Aspose documents. Here is a code snippet how to use this feature.

using Aspose.Words;
using GroupDocs.Comparison;

string sourcePath = @"source.docx";
string targetPath = @"target.docx";
string resultPath = @"result.docx";

using (Comparer comparer = new Comparer(sourcePath))
{
      // Add target document and save comparison result to Comparison.Document object
      comparer.Add(targetPath);
      GroupDocs.Comparison.Document resultDocument = comparer.Compare(resultPath);

      // Create a new Aspose Document object of corresponding format.
      Aspose.Words.Document asposeDocument = new Aspose.Words.Document(resultDocument.Stream);

      // Access the Document's builder to add content.
      DocumentBuilder builder = new DocumentBuilder(asposeDocument);

      // Add some text to the document.
      builder.Writeln("Hello, World!");
      builder.Write("This is an example of using Aspose.Words.");

      // Save the document to a file.
      asposeDocument.Save("output.docx");
}

more details could be found on documentation here.