I am using print module for generating pdf on my websites. Most of the part seems to work fine except when i try to use an image in my node.tpl.php file.

Even though the node page seems to show the image the print pdf page gives an error.

TCPDF ERROR : Can't open image file : /.../print/tcpdf/cache/...

And this only happens when there is an image in node.tpl file.

CommentFileSizeAuthor
error_print.png36.46 KBayush mittal
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

just set 777 permission for both:
folder /print/tcpdf/cache/
files in /print/tcpdf/cache/

jcnventura’s picture

Status: Active » Fixed

Thanks for the heads up.

I've modified the INSTALL.txt to specify that the cache and images folders should be write-enabled. Also, the status report will complain if they aren't.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

drvdt’s picture

Version: 6.x-1.12 » 7.x-1.0-beta2
Assigned: Unassigned » drvdt
Status: Closed (fixed) » Needs review

Still not work. This is erro:
TCPDF ERROR: [Image] Unable to get image: ...../sites/all/libraries/tcpdf/cache/img_D46Hei

jcnventura’s picture

Status: Needs review » Postponed (maintainer needs more info)

Is the file there?

drvdt’s picture

Thanks for your reply soon,
I have fixed it already:

- Use tcpdf
- Chose "Access images via local file access"
All others should be set to default.

But pdf file is not beautiful as dompdf.

jcnventura’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

good to know

CarlHinton’s picture

The error is caused by an error in core file.inc see https://drupal.org/node/2102905#comment-7925581
where there is a patch that fixes this.