Free Support Forum -

HTML to DOCX and image handling

So I saw elsewhere on the site how easy it is to load an HTML file and then save it as DOCX (literally 2 lines of code, it seems). But how are image references handled? I’d like the image references in the HTML file to be invoked during the conversion, with the image being included directly in the DOCX file – that way the final product is self-contained and doesn’t need network access to properly view/edit the file. I know this can be done in MS Word U/I with a just a few clicks, but I was wondering how it would be handled programmatically in ASPOSE.

Hi Garth,

Thanks for your inquiry. Please note that Aspose.Words automatically downloads the image before inserting into the document if you specify a remote URL in src attribute of in Html. Therefore, the output DOCX document contains the image in it and you don’t need network access to view the image in DOCX. Please let me know if I can be of any further assistance.

Best regards,