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

Free Support Forum - aspose.com

Unable to render images on the html page when converting from doc to html

Hi,

I am trying to convert the word doc to html where in the document consists of the images that are not actually from the localdrive but they are something like a url (http:\10.50.10.10\downloadimage.asp?filename=“apple.jpg”) that designate the image. But here i am not getting those images on the html page.

Here is my code snippet:
string finalhtmlpath = string.Empty;
finalhtmlpath = filepath.Replace(".doc", “.html”);

try
{
Aspose.Words.Document doc = new Aspose.Words.Document(filepath);
doc.Save(finalhtmlpath, SaveFormat.Html);
}
catch (Exception ex)
{

}

here the finalhtmlpath is the path of the html file (where to store) and filepath denotes the existing path of the word document.

Note: even before running this code i am just putting the images as the url references in the word document by detecting the shapes and if i try to open that doc i am seeing the images coming correctly but as and when i am using the same document to convert into html i am loosing those images.

If you can help me in this regard i will be very thankful to you.

Thanks,
Yashwanth

Hi Yashwanth,


Thanks for you inquiry.

I am unable to reproduce this issue on my side using latest Aspose.Word, please share you word document file to analyze.