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!