Save comparison result in different format

On this page

GroupDocs.Comparison allows you to save output document in different formats.

To save output document in different format, follow these steps:

  1. Instantiate the Comparer object. Specify the source document path or stream.
  2. Call the Add method. Specify the target document path or stream.
  3. Call the Compare method. Specify the result document path with the required format.

The following code snippet shows how to save comparison result in different format:

using GroupDocs.Comparison;
// ...

using (Comparer comparer = new Comparer("source.txt"))
{
    // Add target document
    comparer.Add("target.txt");

    // Compare and save comparison result
    comparer.Compare("result.pdf");
}

On this page