2017-02-23 98 views
0

嗨,这是控制器,在我试图使用cezpdf将图像添加到我的pdf。任何人都可以请帮助我,因为图像不会显示在生成的PDF中。使用cezpdf将图像添加到pdf

$this->load->library('cezpdf'); 
$this->cezpdf->ezStartPageNumbers(300,14,10,'','',1); 
$this->cezpdf->selectFont('Times-Roman'); 

$this->cezpdf->ezImage(site_url("./includes/sitaralogo.jpg")); 
+0

ad什么是错误或输出以及添加视图以及 –

+0

检查图像URL'$ this-> cezpdf-> ezImage(site_url(“./ includes/sitaralogo.jpg”));' –

+0

没有错误。其他元素越来越显示只有我的形象没有得到显示 – jerome

回答

0

您的网址格式不正确。

假设基址为http://example.comsite_url()函数将返回http://example.com/./includes/sitaralogo.jpg。从有限的代码,我会假设使用site_url("/includes/sitaralogo.jpg")将工作。

+0

嗯,我试过使用上述的答案,但仍没有输出。有没有其他方法可以使用cezpdf库在我的pdf中显示我的徽标? – jerome