HTML to Word (DOCX) conversion, styles are not converting properly

Hi,

We are trying to convert HTML to DOCX with ASPOSE.WORD java library, while conversion styles are not converting as expected

Please find attachments for source html, converted document and expected results

Same HTML we tried with ASPOSE.HTML Java library for PDF conversion, it’s converting as expected, any possibility to convert HTML to Word in ASPOSE.HTML?

Thanks,
Bhaskar.

converted_word.docx (8.2 KB)
expected.PNG (32.2 KB)
source.7z (1.5 KB)

@BhaskarKammaTR Unfortunately, Aspose.Words cannot produce the output you expect from the provided HTML. There is no analog of DIV elements in MS Word documents, so the DIV s are converted to paragraphs in Aspose.Words DOM. In this case Aspose.Words behaves the same way as MS Word does. Here is the DOCX document produced by MS Word from your source HTML: ms.docx (14.2 KB)
To get the expected output in MS Word document you will have to use a table.

No, Aspose.HTML does not support conversion to MS Word documents:
https://docs.aspose.com/html/java/getting-started/supported-file-formats/