We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Several image problem in the result of Saving Word into HTML format

Hi there

We are testing saving Word file into HTML format with Aspose Word 17.2.0
Here is our code for test:

public void testForAspose() {
try {
Document doc = new Document(“custom/input/docx/wordImage.docx”);
Document pageDoc;
LayoutCollector layoutCollector;
DocumentPageSplitter splitter;
ByteArrayOutputStream output = new ByteArrayOutputStream();
HtmlSaveOptions saveOp = new HtmlSaveOptions();

layoutCollector = new LayoutCollector(doc);
splitter = new DocumentPageSplitter(layoutCollector);

byte[] outputContent;
String outputPath = “custom/output/docx”;
String blockID = UUID.randomUUID().toString();
for (int page = 1; page <= doc.getPageCount(); page++) {
pageDoc = splitter.getDocumentOfPage(page);

pageDoc.save(output, saveOp);

outputContent = output.toByteArray();

File outputDir = new File(outputPath + “/” + blockID + “/”);
if (!outputDir.exists())

IOUtils.write(outputContent, new FileOutputStream(outputPath + “/” + blockID + “/” + page + “.html”));

} catch (Exception e) {

I have also uploaded the Word file and the result.
In this case, the image in result page #2 seems to be not completely rendered, and the image in result page #3 was cut

Please check the attachment and help us solve this, thank you~

Hi Craig,

Thanks for your inquiry. We have tested the scenario and have managed to reproduce the same issues at our side. For the sake of correction, we have logged these problems in our issue tracking system as follow:

WORDSNET-14903 : Docx to Html conversion issue with chart's axis bounds
WORDSNET-14904 : Docx to Html conversion issue with shape's rendering

You will be notified via this forum thread once these issues are resolved. We apologize for your inconvenience.

The issues you have found earlier (filed as WORDSNET-14903) have been fixed in this Aspose.Words for .NET 17.3.0 update and this Aspose.Words for Java 17.3.0 update.

This message was posted using Notification2Forum from Downloads module by aspose.notifier.

The issues you have found earlier (filed as WORDSNET-14904) have been fixed in this Aspose.Words for .NET 20.6 update and this Aspose.Words for Java 20.6 update.