Hi<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
Thanks for your request. I tried this on my side and all works fine. I used the following HTML.
<html>
<body>
<img src="http://localhost/TestAsposeWordsImages/myimg.jpg" />
</body>
</html>
Here is code for converting HTML to DOC.
Document doc = new Document("in.html");
doc.Save("out.docx", SaveFormat.Docx);
This problem can occur because you don’t have permissions to open this link. You can try use the following code for testing.
//You should insert your URI
string url = "http://localhost/TestAsposeWordsImages/myimg.jpg";
//Prepare the web page we will be asking for
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "GET";
request.ContentType = "image/jpeg";
request.UserAgent = "Mozilla/4.0+(compatible;+MSIE+5.01;+Windows+NT+5.0";
//Execute the request
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
//We will read data via the response stream
Stream resStream = response.GetResponseStream();
//Write content into the MemoryStream
BinaryReader resReader = new BinaryReader(resStream);
MemoryStream imgStream = new MemoryStream(resReader.ReadBytes((int)response.ContentLength));
//Create Image
Image img = Image.FromStream(imgStream);
//Save Image
img.Save("out.jpg");
Best regards.