TCPDF错误:[图像]无法获取图像 [英] TCPDF ERROR: [Image] Unable to get image

查看:541
本文介绍了TCPDF错误:[图像]无法获取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将 TCPDF 与Drupal的 print 模块结合使用,以生成文章的PDF,当我单击链接以生成PDF时最终显示以下错误消息:

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.

请谨慎帮助:(

推荐答案

显然,TCPDF不使用"fopen"包装器.

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

如果提供图像的URL,则TCPDF会尝试使用cURL将其下载到存储TCPDF安装的缓存"目录中(您必须检查K_PATH_CACHE -constant是否包含内容). .

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).

因此,我想您必须在此目录中具有写权限,魔术才能起作用.另外,您需要启用cURL.

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

这篇关于TCPDF错误:[图像]无法获取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆