Welcome Guest Search | Active Topics | Sign In | Register

HtmlToPdf.ConvertHtml not displaying images in pdf result Options
csalle01
Posted: Thursday, February 21, 2013 11:49:53 AM
Rank: Member
Groups: Member

Joined: 2/21/2013
Posts: 12
I have a web application (asp.net MVC) that passes css and html to the HtmlToPdf.ConvertHtml method and seems to be working very nicely in my development environment (Visual Studio 200). However, the library does not seem to be producing the images from my webpage (only a few primarily just a logo).

Do I need to place the webpage images in a certain location. I tried the project's bin directory where Eo.pdf.dll exists without any luck. Currently, all webpage images are located in the following directory: '/Content/images'. I access them in the webpage using an absolute path.

<img src="/Content/images/imgname.png" alt="title" />
eo_support
Posted: Thursday, February 21, 2013 11:53:35 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

You need to set HtmlToPdf.Options.BaseUrl correctly.

Thanks!
csalle01
Posted: Thursday, February 21, 2013 12:14:31 PM
Rank: Member
Groups: Member

Joined: 2/21/2013
Posts: 12
Thanks so much that worked :)


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.