ssvel
1
Dear Team,
How to convert docx to html using java.I have used this code
Document doc = new Document(MyDir + “Erdemir and Erler-FIGURE 1.docx”);
doc.save(MyDir + “Out.html”, SaveFormat.HTML);
But Images are extracted separately in same place.Please give solution for this
@Vadivel_S_S,
You can use the following code to embed images in generated HTML:
Document doc = new Document("D:\\temp\\in.docx");
HtmlSaveOptions opts = new HtmlSaveOptions(SaveFormat.HTML);
opts.setExportImagesAsBase64(true);
doc.save("D:\\temp\\awjava-18.1.html", opts);