Aspose Document comparison incorrect style difference

Hello,

I am doing a basic Word document comparison and was doing some testing on the documents attached (which are the same document just one is renamed).

There should be no differences, however the document does have one style difference: “Just another test: 1”.
Further debugging reveals the difference it caught is:
“STYLE DEFINITION: Vertical Numbering Symbols”

When I use the Word comparison it doesn’t pick it up, so I’m wondering if there’s a way around this (I still want to compare format differences so the CompareOption of ignoring formatting is not a viable option).

The code I am using is:

Document docA =  new Document(args[0]);
Document docB = new Document(args[1]);
String outputFileName = args[0] + "_compared.docx";

// There should be no revisions before comparison.
docA.acceptAllRevisions();
docB.acceptAllRevisions();
docA.compare(docB, "Difference", new Date());
docA.save(outputFileName);
Document doc = new Document(outputFileName);
System.out.println("Just another test: "+ doc.getRevisions().getCount());

Here are the test documents causing the issue:
Aspose_test.docx (130.2 KB)
Aspose_test.docx (130.2 KB)

Thank you!

@isabelhadziomerovic Thank you for reporting this problem to us. For a sake of correction it has been logged as WORDSNET-24249. We will keep you informed and let you know once it is resolved.
As a temporary workaround, you can ignore formatting upon comparing the documents:

CompareOptions options = new CompareOptions();
options.setIgnoreFormatting(true);
docA.compare(docB, "Difference", new Date(), options);

The issues you have found earlier (filed as WORDSNET-24249) have been fixed in this Aspose.Words for Java 22.9 update also available on Maven.