Inconsistent output when converting from word to HTML

Hello,
I’m trying to convert word to html using the aspose.words JAVA API for some documents I’m not getting the expected output. We require the documents to have h1, h2, h3, h4, h5 and h6 in the HTML corresponding to the styles used in the word document this is a screenshot of the expected output

This is the wrong output screenshot

This is the correct word document correct-ENG-1161-test-doc-v4.docx (14.4 KB)

This is the incorrect word document wrong-ENG-1161-test-doc-v4.docx (9.2 KB)

correct html output cannot upload html file so adding a 7zcorrect-ENG-1161-test-doc-v4.7z (1.5 KB)

wrong html output wrong-ENG-1161-test-doc-v4.7z (2.1 KB)

@harshvardhan.scindia The problem is not reproducible using the latest 23.6 version of Aspose.Words for Java. Here is output HTML produced on my side: out.zip (2.3 KB)
As I can see you are using an old 22.2 version of Aspose.Words. So, I would suggest you to update to the latest version.

1 Like

Thank You So much it works. Aspose has really awesome support.

1 Like