We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Document.compare API is throwing exception

Hi,

We are evaluating Aspose Words 18.11 version and found that Document.compare() API is throwing StringIndexOutOfBoundsException.

The code for reproducing the issue is given below:

 public void testCompare() {
      Document previousDoc=new Document("GrpShapeOnly InDiffPara.docx");
      Document currentDoc=new Document("GrpShapeOnly Insert InDiffPara.docx");
      previousDoc.compare(currentDoc, "author", new Date());
    }

Please find the sample documents in attachment.

Please have a look into the issue and provide us some workaround on this.

Looking forward to your reply.

Thanks
ManishaCompare Issue.zip (38.2 KB)

@oraspose

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issue at our side. For the sake of correction, we have logged this problem in our issue tracking system as WORDSNET-17903. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

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