iam getting html text and image in string builder in below code…By using oDocBuilder.InsertHtml iam writing html text to word document…now how to write Html image to word document using Aspose.words?
Actually my question is by using builder.InsertHtml(html) is it possible to write html image to word document?..IS Inserthtml works ONLY to write html text to word document?..Actually my html string looks like below line…here we are getting imge tag in this type <input type="image" ...> …is it possible to write this way to word document…i mean iam notgetting as <img src='C:\Temp\TestImg.jpg' /> in this model…see my below code can u pls work on this type of html string…here iam getting image from url…try in this model as same as my code and pls let me know…
But by using Insert html just it is writing html text to wrod document not html image by using above html string …can u pls try with tht string which i gave above …
Thanks for your request. Sure, it is possible to insert images using InsertHtml method. But you should note that path to the image should be valid and accessible.
Dear Alexey Noskov,
We are currently evaluating aspose words s/w, actually we are trying generate a pdf from html script from using java, we are using below code but the pdf or word doc is not really showing the image.
but if I create a html from the html code, and open in browser it shows image, that proves that there is no image availability issue, please suggest
Document doc = new Document(getPathToTemplateDoc());
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertHtml("<table> <tr><td><img src='C:\\back.JPG' /></td></tr></table>");
could you please check if aspose words doesnt support this feature?
Thanks for your request. Sure, this feature is supported by Aspose.Words. I used the following code for testing on my side and the image is properly inserted into the document:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.insertHtml("<table><tr><td><img src='C:\\Temp\\logo.png' /></td></tr></table>");
doc.save("C:\\Temp\\out.doc");
There must be a problem with permissions on your side.
Hi Alexey& Nabeel,
Thanks a lot for your quick response, I missed a very small point ‘double back slash’ :-(, now my pdf is showing images absolutely fine. Many thanks for your support.
-Ganesh
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.