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

Free Support Forum - aspose.com

Export image tag issue

Hi,


I’m using Aspose.Word ver 15.6.0.0 and have an issue when I export a html string to word.
The html string contains some image tags but when export, word show an error.

The html string contains:
<img src="/something/media/library/192015/hbhhb.jpg" />

and I also try with other url like this:

<img src=“http://www.natural-beginning.com/wp-content/uploads/2013/09/natural-beginning-home-1.png” />

but after export to word, image not show, just show X character (look like attachment).
I’m appreciated to get any help/suggestion from anybody.

Thanks!


Hi Huy,


Thanks for your inquiry. After an initial test with Aspose.Words for .NET 15.8.0, I was unable to reproduce this issue on my side. I would suggest you please upgrade to the latest version of Aspose.Words. You can download it from the following link. I hope, this help.
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

I used the following HTML for testing:

<html>

<head>

<title></title>

</head>

<body>

<img src="http://www.natural-beginning.com/wp-content/uploads/2013/09/natural-beginning-home-1.png" />

</body>

</html>


Best regards,

Hi Awais,


I has upgraded to latest version (15.8.1) but it doesn’t work. It just show X character like error image.

Here is the code:

DocumentBuilder builder = new DocumentBuilder();
builder.InsertHtml(
@"
");
builder.Document.Save(@“D:\fakePath\library\Doc2.docx”);

What am I doing wrong?

Hi Huy,


Thanks for your inquiry. Regarding the usage of the ‘interim build’ of Aspose.Words i.e. 15.8.1, it was only meant for a particular few customers who required it. We strongly recommend you please use the latest official release of Aspose.Words that is 15.8.0. You can download it from following link. It worked fine on my end (see attached 15.8.0.doc).
http://www.aspose.com/community/files/51/.net-components/aspose.words-for-.net/default.aspx

Are you able to open this image link in web browser? Can you please try some other links?

Best regards,

It seems the issue comes from your proxy server you’re using. Make sure you have the full access to the images you wanted to export to word.

I got the same issue as Huy faced when using the proxy server at work, but it solved after a short time investigation:)