如何在fpdf中以列格式放置单元格和多单元

时间:2016-03-15 06:11:55

标签: php fpdf

有几种解决方案可以在fpdf中创建列,您可以在其中放置多单元或单元 但问题是

这些解决方案不起作用 单个多单元和像这个图像中的单元

列格式图片 enter image description here

//Column 1
$x = $this->x;
$y = $this->y;
$push_right = 0;
$w=130;
$this->MultiCell($w = 130,10,"This is a test line.This is a test line.",0,'L',0);


//Columns2
$push_right += $w;
$this->SetXY($x + $push_right, $y);
$this->SetFont($this->font,'B',10);
$this->Cell($w = 30,10,"SHORT LINE",1,'L',1);



//Column 3
$push_right += $w;
$this->SetXY($x + $push_right, $y);

$this->Cell(0,10,"SHORT TEXT",1,'R',1);

//cell for column 3
$push_right += 130;
$this->SetXY($x + $push_right, $y);
$this->SetFont($this->font,'B',10);
$this->Cell($w = 30,10,"SHORT TEXT",1,'L',0);


//cell for column 3
$push_right += $w;
$this->SetXY($x + $push_right, $y);

$this->Cell(0,10,"SHORT TEXT",1,'R',0);

0 个答案:

没有答案