I'm trying to convert xhtml file to docx and find following example code:
wordMLPackage.getMainDocumentPart().getContent().addAll(XHTMLImporter.convert(new File(inputfilepath), null, wordMLPackage) );
wordMLPackage.save(new java.io.File(System.getProperty("user.dir") + "/html_output.docx") );
It seems all data will be load in memory, is that right? If the xhtml(include image) is a big file, it may cause OOM. Anyone know how to prevent this?
Many Thanks!