Free Support Forum - aspose.com

Number of span tags not comes proper to compare content

Hi Team,

As per our requirement we need to compare content of two document after convert .docx to html.

For example:
we have two word document A.docx and B.docx, where B.docx is copy of A.docx. In document B.docx some content is changed by Author in some paragraphs or tables etc.

When we convert A.docx to A.html and B.docx to B.html and compare content of document based on elements p, span, table,h1 etc.

In some of the location number of tags are mismatch even I didn’t do any changes on that particular paragraphs.

Due to this “span” tags our comparison logic give us wrong result.

For more detail please find attached screen shot,java code and docx file (Refer Page 14 of document to check span tags).

Could you please suggest us why number on span tag not comes equal in both html file.

Thank you!
For Aspose team.zip (1.7 MB)

@purusadh2003,

Please upgrade to the latest version of Aspose.Words for Java i.e. 18.7 and try calliing Document.JoinRunsWithSameFormatting method before saving. Hope, this helps.

Thanks Awais.