2017-02-23 102 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