Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I'm using TCPDF with Drupal's print module to generate PDF of articles, & ending up with following error message when I click the link to generate PDF:

TCPDF ERROR: [Image] Unable to get image: http://localhost/pathToDrupal/themes/bartik/logo.png

The Image exists in the location specified. I tried applying:

allow_url_fopen = On;
allow_url_include = On;

in php.ini but that could not resolve the problem.

Please care to help :(

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
692 views
Welcome To Ask or Share your Answers For Others

1 Answer

Apparently the "fopen"-wrappers are not used by TCPDF.

If you supply the URL of an image, TCPDF tries to download it with cURL into the "cache"-directory where your TCPDF-installation is stored (you have to check what the K_PATH_CACHE-constant contains to be sure).

So I guess you have to have write permissions in this directory that the magic works. Also you need cURL enabled.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...