In my Page Test.aspx(Test.aspx.cs). The path of image is just relative to Test.aspx.
The generated document does not show the image. I know that it is a problem of Image path. Aspose.Words is not able to get the right image path. If I provide the "<img src='"+Server.MapPath("images/logo_main.gif")+"' /> " , it works or I provide it as <img src='localhost://images/logo_main.gif' />, also works. But I can not do these because our preexisting documents have relative url. My suggestion is that you people can provide a property to set the context path for the document, so that Aspose.words can map the path automatically.
Thank you for your interesting question. We’ll think about how to parameterize the base URI to affect InsertHtml. But I probably can suggest workarounds for you. Since the documents are being constructed with InsertHtml calls you can prepend every HTML snippet with the following string:
Hi Klepus,
Thanks for your response. This helped me to fix the problem. I will recommend to my company to use Aspose.Words. Though I can write word documents by using Microsoft SDK for Office OpenXml Format, yet I liked the insertion of html in to word doc and converts it to WordML.