-2

I had tried different libraries like Apache POI, Apache Tika, Mammoth, etc and StackOverflow like Convert .docx to HTML using JAVA but none of the given exact font and color while converting Docx to HTML.

I am able to convert Docx to HTML but the problem is formatting and CSS styles mismatching between Docx and Html.

Sample input content:

enter image description here

Please help me out.

Sathiamoorthy
  • 8,831
  • 9
  • 65
  • 77
  • Probably the easiest way would be to use the [Aspose.Words for Java API](https://blog.aspose.com/2020/07/15/word-document-doc-docx-to-html-conversion-using-java/). A few lines of code and you're done. – DevilsHnd - 退職した Dec 22 '20 at 07:48
  • Aspose is a paid version, I can't purchase it. – Sathiamoorthy Dec 22 '20 at 09:47
  • 1
    This could also have been closed because it is a request for a software recommendation. These are explicitly off-topic. If you want to understand the downvotes, I suggest you read [How do I ask a good question?](https://stackoverflow.com/help/how-to-ask), [What types of question should I avoid asking?](https://stackoverflow.com/help/dont-ask) and [What topics can I ask about here?](https://stackoverflow.com/help/on-topic). – Stephen C Dec 23 '20 at 03:58
  • @StephenC, I have mentioned what are the library and my problems, I didn't requested not direct software recommendation. Please help me to reopen vote, – Sathiamoorthy Dec 23 '20 at 06:24
  • If I thought that your question was suitable for reopening, I would vote. You need to edit it to make it more suitable for StackOverflow before I will vote to reopen. Sorry. The links I provided above should help you figure out what is needed. – Stephen C Dec 23 '20 at 07:03
  • I have edited my question, please check and add if need more edits. – Sathiamoorthy Dec 23 '20 at 07:15

1 Answers1

2

There is a project in GitHub that may suffice your needs: java-mammoth

I think is a little stable and easy to use, above all it's open-source, many guys use it.

Sathiamoorthy
  • 8,831
  • 9
  • 65
  • 77
AtomX
  • 364
  • 2
  • 13
  • I tried already, mammoth not support alignment, font-style, and color. See this demo link to check how mammoth support https://mike.zwobble.org/projects/mammoth/ – Sathiamoorthy Dec 22 '20 at 10:04