TCPDF远程图像加载问题 [英] TCPDF remote image loading problem

查看:160
本文介绍了TCPDF远程图像加载问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将远程图像加载到由tcpdf生成的pdf中但是我似乎无法使其工作?

Im trying to load a remote image into a pdf generated by tcpdf however I can't seem to get it to work?

其余的pdf加载正常它似乎试图检索图像,但它只是打印到页面?

The rest of the pdf loads fine and it looks like to trying to retrieve the image however it just does print to the page?

我使用的代码是:

$pdf->Image("http://media.domain.com/logo.jpg", 0, 0, 100, 150, 'JPEG', '', 'T', true, 72,'','','','','','','');

任何有关这方面的帮助都将是一个巨大的帮助,

Any help on this would be a massive help,

谢谢,

推荐答案

我认为你需要设置

allow_url_fopen = On

在php.ini中

它对我有用

$pdf->Image('http://chart.apis.google.com/chart?cht=ls&chd=t:1366,1459,2534,2551,2589&chco=76A4FB&chls=2.0,0.0,0.0&chxt=x&chxl=0:|19|20|21|22|23&chs=600x150&chds=1366,2589', '', '', 100);

这篇关于TCPDF远程图像加载问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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