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

Free Support Forum - aspose.com

Convert DOCX Word Document with Inline Images to HTML Fixed Format using Java and Retain Image Positions


When we try to convert the enclosed document to HTML, it moves all the images in the document.
This seems like a different cause than WORDSNET-20153
I’ve tested this and it seems to have something to do with the images being ‘in line’. When I move the images to ‘in front of text’ it does work.
aspose.zip (8.5 MB)

This has been tested on version 20.3 (currently the latest version) and can be reproduced using the following code:

String lFileName = “D:\aspose\image inline.docx”;
String lSaveName = “D:\aspose\test.html”;

Document lDocument = new Document(lFileName);

File lFile = new File(lSaveName);
File lDirectory = lFile.getParentFile();
HtmlFixedSaveOptions lOptions = new HtmlFixedSaveOptions();
lOptions.setResourcesFolder( lDirectory.getCanonicalPath() + “/rsc” );
lOptions.setResourcesFolderAlias( lDirectory.getCanonicalPath() + “/rsc” );
lDocument.save(lSaveName, lOptions);

Best Regards


We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-20224. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Hi, after viewing this issue today, I noticed this issue status was ‘Closed’.
What does this mean exactly? Is this fixed in the new version?


Yes, WORDSNET-20224 has now been resolved. The fix of this issue will be included in the 20.5 (next version) of Aspose.Words for Java. We will inform you via this thread as soon as the next version containing the fix of this issue will be released in next few days.

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


I can confirm that this issues is resolved now.
Thank you.