Get list of changes

GroupDocs.Comparison allows to obtain list of changes between source and target documents.

The following are the steps to obtain changes list.

  • Instantiate Comparer object with source document path or stream;
  • Call Add method and specify target document path or stream;
  • Call Compare method;
  • Call GetChanges method.

The following code sample shows demonstrates how to get list of all changes.

Get list of changes from local disk

using (Comparer comparer = new Comparer("source.docx"))
    ChangeInfo[] changes = comparer.GetChanges();

Get list of changes from stream

using (Comparer comparer = new Comparer(File.OpenRead("source.docx")))
    ChangeInfo[] changes = comparer.GetChanges();

More resources

GitHub Examples

You may easily run the code above and see the feature in action in our GitHub examples:

Free Online App

Along with full-featured .NET library we provide simple, but powerful free Apps.
You are welcome to compare your DOC or DOCX, XLS or XLSX, PPT or PPTX, PDF, EML, EMLX, MSG and other documents with free to use online GroupDocs Comparison App.

© Aspose Pty Ltd 2001-2022. All Rights Reserved.