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

Free Support Forum - aspose.com

Compare Word DOCX Documents using Java & Retain Table Columns Size or Cell Widths

hi, i’d like some help with the comparison of the two attached documents as per the code snippet below. In the exported document doc.docx the removed column width is drastically decreased. Attached a screenshot of the result. Any advice on how this should be handled would be appreciated

Document docA = new Document("C:\\Users\\vj\\Downloads\\Default 051621 - 09.03.32 PM (1).docx");
Document docB = new Document("C:\\Users\\vj\\Downloads\\Default 051821 - 12.41.37 AM.docx");
docA.compare(docB, "user", new Date());
docA.save("C:\\Users\\vj\\Downloads\\doc.docx");

Default 051621 - 09.03.32 PM (1).docx (8.5 KB)
Default 051821 - 12.41.37 AM.docx (21.3 KB)
Capture.PNG (2.0 KB)

@Vaidas,

But, MS Word 2019 also produces a similar output when comparing these two DOCX Word documents (see compared by ms word 2019.docx (83.1 KB)). So, this seems to be an expected behavior as in this case, the latest (21.5) version of Aspose.Words mimics the behavior of MS Word. In case you have further inquiries or may need any help in future, please let us know.