小编Pet*_*ter的帖子

来自URL的Zend_Pdf_Image :: imageWithPath

我正在使用一个基于URL参数生成PNG图像的脚本image_id.例如:http://www.example.com/image.php?image_id=G554jGTT

现在我想将该图像放在pdf中,如下所示:

$imagepath = "www.example.com/image.php?id=" . $id;
$image = Zend_Pdf_Image::imageWithPath($imagepath);
Run Code Online (Sandbox Code Playgroud)

当我使用本地文件一切顺利,但当我使用URL时,我收到以下错误:

Fatal error: Uncaught exception 'Zend_Pdf_Exception' with message 'Cannot create image resource. File not found.' in E:<...>\library\Zend\Pdf\Resource\ImageFactory.php:38

有人知道怎么做这个吗?

谢谢!

pdf url zend-framework image

2
推荐指数
1
解决办法
4067
查看次数

标签 统计

image ×1

pdf ×1

url ×1

zend-framework ×1