Free Support Forum - groupdocs.com

Compare two documents from URL paths in .NET

I’m getting mixed messages from the site documentation. I need to compare 2 word files found from URL paths. I see “Compare From Streams” methods (https://docs.groupdocs.com/display/comparisonnet/Home), but I have also read in the forums that streams are not supported.


Can I use GroupDocs to compare the word documents using a URL path?

Thanks

@sfaili,

GroupDocs.Comparison for .NET API supports following ways to load a document for comparison:

Have a look at the code below:

using (Stream sourceStream = File.OpenRead(Constants.SOURCE_WORD))
using (Stream targetStream = File.OpenRead(Constants.TARGET_WORD))
{
      using (Comparer comparer = new Comparer(sourceStream))
      {
               comparer.Add(targetStream);
               comparer.Compare(File.Create(outputFileName));
      }
 }

Please download sample application here.