Hi,
we noticed an issue on comparing rtf documents. When calling the Compare method an unhandled NullRefefenceException
is thrown. As we internally tried to find out if we make something wrong or not we were able to reduce the scenario as following:
If the original document ends with a table, the exception is thrown. If there is any kind of text after the table, everything is working fine. If you try to reproduce the issue with the attached example files and the following snippet, it is important to set a license as otherwhise there automatically is that trial notification text appended.
file old.rtf: the old revision
file old text.rtf: an alternative version of the old revision which has text after table
file.rtf: the new revision
Code to reproduce the isse:
var lic = new License();
lic.SetLicense(@"S:\Aspose.Total.lic");
var doc_old = new Document(@"S:\tmp\file old.rtf"); // you may replace this with "file old text.rtf" to check the behaviour if there is text after the RTF table
var doc_new = new Document(@"S:\tmp\file.rtf");
doc_old.Compare(doc_new, "Name", DateTime.Now);
Files:
files.zip (3.2 KB)
Kind Regards,
Daniel