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

Free Support Forum - aspose.com

.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: . 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 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


This message was posted using Page2Forum from Aspose.Words for .NET - Documentation

Hi

Thanks for your request. I think, you can simply specify BaseUri upon loading your documents. Please see the following link for more information:

http://www.aspose.com/documentation/.net-components/aspose.words-for-.net/aspose.words.loadoptionsconstructor3.html

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!