Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
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.
Comment | File | Size | Author |
---|---|---|---|
error_print.png | 36.46 KB | ayush mittal |
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commentedjust set 777 permission for both:
folder /print/tcpdf/cache/
files in /print/tcpdf/cache/
Comment #2
jcnventura CreditAttribution: jcnventura commentedThanks 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.
Comment #4
drvdt CreditAttribution: drvdt commentedStill not work. This is erro:
TCPDF ERROR: [Image] Unable to get image: ...../sites/all/libraries/tcpdf/cache/img_D46Hei
Comment #5
jcnventura CreditAttribution: jcnventura commentedIs the file there?
Comment #6
drvdt CreditAttribution: drvdt commentedThanks 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.
Comment #7
jcnventura CreditAttribution: jcnventura commentedgood to know
Comment #8
CarlHinton CreditAttribution: CarlHinton commentedThe 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.