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

Free Support Forum - aspose.com

Issues with Document.compare API When Normal text changed to Heading

Hi,

We need to compare two word documents and for this feature, we are using Document.compare(Document, User, Date) API.

We tried to evaluate this API with a specific scenario, where normal text’s format is being chnaged to MS Word native heading i.e.,Heading 3.

In the revision document, we are seeing whole content being striked off. The revision docuemnt looks messy and totally wrong.

The code used for this feature is given below:

Document doc1=new Document(“10k.docx”);
Document doc1=new Document(“10k_NormalText_To_Heading.docx”);
doc1.compare(doc2,“Manisha”,new Date());
doc1.save(“rev_10k_NormalText_To_Heading.docx”);

The documents are attached for your reference.

Please help us in resolving this issue.

Thanks
Manisha Sharma

Hi Manisha,

Thanks for your inquiry. I have attached a compared document which was produced by using MS Word 2013 on my side here for your reference. You'll see MS Word changes normal text's format to native heading i.e.,Heading 3 too. So, this seems to be an expected behavior. If we can help you with anything else, please feel free to ask.

Best regards,

Hi,



Thanks for looking into this matter.

If you look at MS Word generated compare document, you will see none of the content being strike off (deleted) but in the compare document generated by Aspose Compare API, entire content is shown deleted.

Please have a look at the snapshot where the left side MS generated document and right side is Aspose generated document.

I hope this snapshot can demonstrate the issue correctly.

Please let me know if you need more information on this.

Thanks
Manisha

Hi Manisha,


Thanks for the additional information. I was unable to reproduce this issue on my side. Please upgrade to 15.8.0 and see attached “15.8.0-awjava.docx” document. Hope, this helps.
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

Best regards,