Word to MHTML Conversion results in lost images

HI. We have been trying to upgrade to a more recent version of Aspose Words.Net to take advantage of some of the recent enhancements. We have seen an issue, however, which is preventing us from upgrading.

The problem is embedded images fail to be displayed when we execute Word to MHTML conversion.

We are currently using version 10.3 in production, but we have seen this problem since at least release 11.5 of Aspsose Words .Net.

I am wondering if this is a known problem with a simple fix? I imagine it must be, otherwise it would be difficult for customers who use this feature to upgrade.

Can you please advise on what we may be doing wrong?

I’ve attached a document that demonstrates the problem we are seeing.

Thanks,

Brian

Hi Brian,

Thanks for your inquiry. Perhaps, you are using an older version of Aspose.Words; as with Aspose.Words v13.2.0, I am unable to reproduce this problem on my side. I would suggest you please upgrade to the latest version of Aspose.Words i.e. v13.2.0and let us know how it goes on your side. I hope, this will help.

I have attached the output mhtml file with this post for your kind reference.

Hi. I tested with several versions of Aspose Words for .Net. Including version 13.2.
We have bundled conversion features and offer conversion services within IIS 6.0.
When a document is submitted to the service, the conversion takes place, but the areas where the images should be presented are left blank without any image. There is just a placeholder where the image is supposed to be.
When I convert on my desktop using a simple console application, I can see the images.
Can you share any thoughts as to why the behavior may be different on IIS?
Please let me know.
Thanks,
Brian

Hi Brian,

Thanks for your inquiry. Could you please share your code which causes this issue? Please supply us with the output document showing the undesired behavior. I will investigate the issue on my side and provide you more information.

In your case, I suggest you please use HtmlSaveOptions.ImagesFolder property to specify the physical folder where images are saved when exporting a document to HTML format. ImagesFolder allows you to specify where the images will be saved and ImagesFolderAlias allows to specify how the image URIs will be constructed. Please read the member of HtmlSaveOptions class from here:
https://reference.aspose.com/words/net/aspose.words.saving/htmlsaveoptions/

Moreover, please read following forum link for your kind reference.
https://forum.aspose.com/t/59101

Hope this helps you.