Free Support Forum -

Comparison is using file instead of stream


Hi there,

I just upgraded to v. 2.4.0 and I’ve run into a problem.

It seems that when calling the ComparisonService methods for SourceFileName or TargetFileName, it is now requiring that file actually exists. That’s fine except that now it ignores the stream and uses the file as the comparison source/target.

In previous versions I was able to just pass in a dummy file name and it worked no problems. Now I’m getting the error that the file doesn’t exist. So I created dummy files, pass those in along with the stream of the file I want compared, but the result compared the dummy files.

Is this something you are aware of already?



Thank you for your request. Unfortunately the Comparison doesn’t work with the streams, only with local files. Since that you get “document not found” error and this is the reason for why it compare your dummy files. To compare documents you should save your streams as a files and then compare them. After comparing you can delete them.

Best regards.


So am I correct that this is new to 2.4.0?



Thank you for coming back. No, it was from the beginning. Could you please share with us your project example where you use the streams?

Thank you.


Here you go.

I had trouble getting the zip file uploaded when Groupdocs.Web.UI.Comparison.dll was included, so I’ve removed that. Please include version and you will see that I am using only streams to do a compare.



Thank you for your example. Yes, in the Comparison streams where supported but in the latest versions we have removed it temporary because of some issues. We will return streams when the issue will be resolved , likely in the next version.

Best regards.


Hi, we’re experiencing the same problem when making comparisons in version 2.5.0. Any estimate when this will be fixed? There is also a similar problem when saving the comparison. When you try to save the comparion to a stream, you get a Null Pointer Exception, but when you save it to disk it works.


Hello Lars,

Thank you for the request. Unfortunately I can’t share any ETA for when this will be resolved.
As for the issue with stream - it happens because the Comparison can’t work with streams currently.

When the issue will be fixed I will notify you here.

Best regards.