Images are incorrect when stored in html format

Hi Aspose team,

I am using Aspose Word 17.2.0 to convert a Word file to a HTML file.
As a result, all embedded images will be wrong.

Here is the code I'm using:

public void html() throws Exception {
long start = System.currentTimeMillis();

createWordLicense("src/test/config/etc/aspose.lic");

Document document = new Document(
"custom/input/docx/圖片+文字.docx");
HtmlSaveOptions op = new HtmlSaveOptions();

op.setExportTextInputFormFieldAsText(false);
op.setExportTocPageNumbers(true);
op.setExportPageSetup(true);
op.setExportDocumentProperties(true);
op.setExportRelativeFontSize(false);
op.setExportHeadersFootersMode(ExportHeadersFootersMode.FIRST_PAGE_HEADER_FOOTER_PER_SECTION);
op.setImagesFolder("custom/output/docx/aspose");
OutputStream out = new FileOutputStream(new File("custom/output/docx/Resume.html"));

document.save(out, op);
}


And I also uploaded the origin Word file.
Please help me figure it out what happend, thanks.

Hi Lai,


Thanks for your inquiry. After an initial test with Aspose.Words 17.2.0, we were unable to reproduce this issue on our end. Please see attached following files:

msw-2016.htm: This was generated by using MS Word 2016
17.2.0.html: This was generated by using Aspose.Words 17.2.0 and the code you provided.

Both files look identical.

Please create comparison screenshots highlighting (encircle) the problematic areas in these HTML files and attach them here for our reference. We will investigate the issue(s) further on our end and provide you more information.

Please also ZIP and attach the HTML file which was produced on your end and which shows the undesired behavior here for testing. Thanks for your cooperation.

Best regards,

Hi Awais Hafeez,


I also used the Aspose Word 17.2.0 version to do the transfer.
But the embedded images are still wrong.

And I also uploaded the origin Word file and the result.
Please check this issue again, thank you~

Hi Lai,


Thanks for your inquiry.

While using the latest version of Aspose.Words for Java 17.2.0, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSJAVA-1499. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSJAVA-1499) have been fixed in this Aspose.Words for .NET 17.4 update and this Aspose.Words for Java 17.4 update.


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