在Multicell中安排FPDF?

时间:2013-09-23 08:56:14

标签: php codeigniter fpdf

我想使用Multicell在FPDF上制作表格格式。我想在项目描述上有一个多单元格,但我不能这样做:

| item id | code |项目/描述|单价|总金额| < -this format

这是我的代码

    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;
  }

1 个答案:

答案 0 :(得分:0)

你可以解决问题,尝试一下

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