我結束了使用fpdf與笨,這裏是我如何添加圖像
function setReportGeneralPageHead($report_name, $print_date){
$this->fpdf->Image(base_url().'system/application/images/somelogo.jpg',10,3,60,0,'');
$this->fpdf->Image(base_url().'system/application/images/another-logo.png',225,10,60,0,'');
$this->fpdf->SetFont('Arial','',11);
$this->fpdf->Cell(140,45,$report_name,'',0,'L');
$this->fpdf->SetFont('Arial','',11);
$this->fpdf->Cell(135,45, "Generated on: ".$print_date,'',0,'R');
//$this->fpdf->Line(20, 20, 190, 20);
$this->fpdf->Ln(15);
}
真的沒人?是過時的圖書館? – rax313 2011-05-18 06:22:04
我已經使用fpdf和CodeIgniter,並且取得了巨大的成功。如果你願意使用另一個圖書館,告訴我,這樣我可以開發更深入的答案。 – Cronco 2011-05-18 06:33:45
@Cronco - 我剛剛嘗試過使用它,格式對我來說有點困難,尤其是在爲CodeIgniter結果創建表格時。令人沮喪的是,我需要的僅僅是1張圖片來添加到PDF中,然後我必須重做所有的東西,正因爲如此。 – rax313 2011-05-19 01:41:57