The compare/merge provokes changes in the formatting of the resultant document

Hello,

We are using Aspose 20.3 for Java to compare and merge two documents which most of the time works perfectly, but now we have two documents and after merging them the resultant document will be affected by unexpected changes in the format as you can see in the attached screenshot.
compare.png (92.9 KB)

For the same scenario, there are no problems with Word.

I prepared the next code sample to reproduce the issue.
code-sample.zip (463 Bytes)

We could not identify what is causing changes in the formatting, could you please help us to identify what part of the document is affecting the merging?

@tayes

Could you please ZIP and attach your input Word documents here for testing? We will investigate the issue and provide you more information on it.

@tahir.manzoor,

I am sorry, forgot to include the documents.
Attached the documents in a zip file.
docs.zip (78.4 KB)

Thanks

@tayes

We have tested the scenario using the latest version of Aspose.Words for Java 21.4 and have not found the shared issue. So, please use Aspose.Words for Java 21.4. We have attached the output document with this post for your kind reference. 21.4 compare.zip (39.2 KB)

@tahir.manzoor,

Thanks, that solved our problem.