Document comparison throws System.ArgumentOutOfRangeException


one of our customers reported an exception during comparison of two documents. The exception can be reproduced with the following code:

        static void Main(string[] args)
            var lic = new License();


            var oldDoc = new Document(@"S:\tmp\doc\old.docx");
            var newDoc = new Document(@"S:\tmp\doc\new.docx");

            newDoc.Compare(oldDoc, "Test", DateTime.Now);


Documents are in the attachments.

Thanks for your help,
Daniel (298.0 KB)


We have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21768. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-21768) have been fixed in this Aspose.Words for .NET 21.3 update and this Aspose.Words for Java 21.3 update.