2013-09-23 32 views
0

我想使用Multicell在FPDF上製作表格格式。我想有一個多細胞的項目描述,但我不能這樣做:在多單元中安排FPDF?

| item id | code |項目/說明|單價|總金額| <這裏 - 這格式

是我的代碼

foreach($data as $row) { 

     $this->MultiCell($w[0],4,$row[0],'LR',0,'C',$fill); 
     $this->SetFont(''); 

     $this->MultiCell($w[1],4,$row[1],'LR',0,'C',$fill); 
     $this->SetFont(''); 

     $this->MultiCell($w[2],4,$row[2],'LR',0,'R',$fill); 
     $this->SetFont(''); 

     $this->MultiCell($w[3],4,$row[3],'LR',0,'R',$fill); 
     $this->SetFont(''); 

     $this->MultiCell($w[4],4,$row[3],'LR',0,'R',$fill); 
     $this->SetFont(''); 

     $this->Ln(); 
     $fill =! $fill; 
    } 

回答

0

你能解決你的問題,嘗試它

http://youhack.me/2010/06/10/dynamically-generate-pdf-files-in-php/