I am converting HTML to doc.There are images in HTML which have relative URL.Due to relative URL, generated doc doesn't display the image.Can you anyone tell me how resolve relative URL, so doc to display images?Also, when user is not connected to internet, images with full or absolute urls are not displayed. can you anyone help me solve this issues?

Please find attached sample code using which I am trying to convert html string to doc.Html string have "<img src=" pointing to live url of image. Image is added to generated doc but displayed only when I am connected to internet. So Its linked image and I want it to embed it to document, so even if I am not connected to internet, I see images in my doc file.

Again, highlighting I am converting Html string to doc.

Also, you can check the html file opening browser and document. Formatting and look & feel are much different.

So according to you, If I convert html to xHtml and the use XHTMLImporter to convert it to doc, images would be embedded instead of linked, then I see images in doc even if I am not connected to Internet.

I tried converting my html to xhtml using Jtidy and then used xHTMLImporter for converting generated xhtml to doc. Doc is generated successfully and I am able to see the image without internet also, but the formatting of bullets points are very bad.