I'm not positive that this is the best forum, but none of the others seem right either.

I've been running Drupal for about a year and a half and I installed print support very early on and I thought that I had the PDF support working, but last week I tried to click on the PDF of a page and I got the following error message:

TCPDF ERROR: [Image] Unable to get image: file:///home/louusiteadmin/liveoakuu.org/sites/all/modules/print/images/PostTagIcon.png

I grep'd the print source and didn't find a reference to PostTagIcon.png. I searched the site and finally found the file in the theme's directory.

I'm not seeing anyone complaining about this, so I suspect that is a issue with my site's theme.

I found http://drupal.org/node/518794, but adding

allow_url_fopen = On;
allow_url_include = On;

to php.ini didn't help.

Finally, I created the modules/print/images directory, copied PostTagIcon.png to it, and got the PDF support to work.

So, I fixed it with a hack, but what is the real solution?

For what it's worth, I'm running Drupal 6.20, Print 6.x-1.12 and I was using tcpdf 4.8.016, but 5.9.047 didn't work any better.

Comments

wolf_22’s picture

I'm up against the wall on this, too.

I might be wrong but the issue seems pattern-related (REGEX). I'm still trying to pinpoint the exact source of the issue but know without any doubt that it's coming from the print.pages.inc file and somewhere around lines 253 and 285 (or so I suspect--this is coming without a lot of effort in sussing this out).

I personally found that setting the logo configuration to "None" in the print settings of the module allows for the PDF capability to successfully print, so maybe this could be a temporary work-around until a better and actual FIX comes?

If I find anything else out about all this, I'll try to post again (realizing that this is a late thread but since people often stumble across stuff like this in their efforts to fix stuff, I thought I'd respond anyway.)

wolf_22’s picture

Okay, so I JUST found something directly after responding above... Ha. And it's not really a true *FIX* but it's useful to know... If you enable the cURL extension, it seems to work--at least, it did for me in my setup.

Here's where I found this pseudo solution: http://stackoverflow.com/questions/7665540/tcpdf-error-image-unable-to-get-image