.net Rich Text Editor - saves relative path <img src='/relativepath/image.jpg' > shows up with X in document creation

Hello,
I am currently evaluating your document creation product. We have a rich text editor that saves embedded images with a relative path: <img src="/relativepath/image.jpg">. When we use the Aspose doc creation to create a Word document we get a red X where the image is supposed to load. When I change the data and put in an absolute path <img src="http://pathwhereimageis/image.jpg"> it does display the image correctly.

So, my question: is there a way to pass in the image path to the doc creation function for the images to display correctly in the Aspose created Word document.
Thanks for your time.
Jenn Shaffer

Hi
Thanks for your request. I think, you can simply specify BaseUri upon loading your documents. Please see the following link for more information:
https://reference.aspose.com/words/net/aspose.words.loading/loadoptions/
Hope this helps.
Best regards,

Yes, that is what I’m looking for. I have an implementation question for you though. I have many fields that have rich text that I am using to create the Word document. How do I incorporate all of those fields into 1 final document using the document builder.
Thanks again.

Hi
Thanks for your request. You can use DocumentBuilder.InsertHtml method to insert pieces of HTML into your mail document. But in your case you will have to add the following HTML line before each piece of HTML:

<base href='file:///c:/temp/' />

This is needed to resolve relative paths.
Best regards,

Thanks! That works great!