Hi Aslam,
Thanks for your inquiry.
While using your code and the latest version of Aspose.Words i.e. 10.5.0, I was unable to reproduce this issue on my side. However, I would like to suggest you the following link for downloading and using the latest version of Aspose.Words:
Moreover, to insert a picture inside Word document via HTML, please see the following code snippet that worked for me:
Document doc = new
Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// approach 1
string html = @"<p><img
src='https://plm.sungard.com/ImageRenderer?ImageID=3003121' alt='test image'
width='178' height='129' /></p>";
builder.InsertHtml(html);
// approach 2
builder.InsertImage("https://plm.sungard.com/ImageRenderer?ImageID=3003121",
178, 129);
doc.Save(@"c:\test\imageInDoc.doc");
I hope, this will help.
Best Regards,
Awais Hafeez
Support Developer
Aspose Sialkot Team
Aspose - Your File Format Experts
Keep in touch! We're on
Twitter and
Facebook