Welcome Guest Search | Active Topics | Sign In | Register

Problem with images not working in a PDF Options
d.w.wer
Posted: Thursday, August 2, 2012 2:06:45 PM
Rank: Newbie
Groups: Member

Joined: 8/2/2012
Posts: 4
Hi,

I am trying to implement your EO.PDF html converter in out site. I have been successful on my development machine however it is not working on our server and I'm not sure why.

Here are links to the generated PDFs.

Working Images

Images Not Working

Here is the code that generated the PDFs.

Code: C#
litMessage.Text = "";
string html = "<HTML> <HEAD> <TITLE> : Trade Name / Partnership Search</TITLE> </HEAD> <BODY> <IMG SRC=\"http://www.e-search.ca/images/alta.gif\" ALIGN=\"LEFT\" ALT=\"Alberta Logo\" WIDTH=185 HEIGHT=60> <br /><br /><br /> <IMG SRC=\"http://www.e-search.ca/images/corp_small.gif\" ALIGN=\"LEFT\" ALT=\"Corporate Registry Seal\"></BODY> </HTML>";

string dir = "../files/_temp/eoTest/";
string fileName = Guid.NewGuid().ToString() + ".pdf";

setPDFLicense();

//EO.Pdf.HtmlToPdf.Options.GeneratePageImages = true;
EO.Pdf.HtmlToPdf.ConvertHtml( html, Server.MapPath( dir ) + fileName );

litMessage.Text += "<br /><br />";
litMessage.Text += "<a href='" + dir + fileName + "'>PDF</a>";


Any idea how I can solve this problem?

Thanks!

-Dale
eo_support
Posted: Thursday, August 2, 2012 2:08:22 PM
Rank: Administration
Groups: Administration

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

That usually is caused by:

1. The image path is wrong;
2. Your web application does not have sufficient permission to access the image files;

Thanks!
d.w.wer
Posted: Thursday, August 2, 2012 2:33:28 PM
Rank: Newbie
Groups: Member

Joined: 8/2/2012
Posts: 4
Hi,

Thanks for the response. I found the issue. The server for some reason can't browse to it's self I'll have to contact our admin. Thank you for your help.

-Dale
eo_support
Posted: Thursday, August 2, 2012 3:05:21 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Great. Glad to hear that it's working for you. Thank you very much for the update!


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.