2012-11-15 3 views

答えて

14

FPDFはrowspanまたはcolspanを認識しません。空のセルを使用し、Cellborderという属性を使用することで回避できます。

$pdf->Cell(40,5,' ','LTR',0,'L',0); // empty cell with left,top, and right borders 
$pdf->Cell(50,5,'Words Here',1,0,'L',0); 
$pdf->Cell(50,5,'Words Here',1,0,'L',0); 
$pdf->Cell(40,5,'Words Here','LR',1,'C',0); // cell with left and right borders 
$pdf->Cell(50,5,'[ x ] abc',1,0,'L',0); 
$pdf->Cell(50,5,'[ x ] checkbox1',1,0,'L',0); 
$pdf->Cell(40,5,'','LBR',1,'L',0); // empty cell with left,bottom, and right borders 
$pdf->Cell(50,5,'[ x ] def',1,0,'L',0); 
$pdf->Cell(50,5,'[ x ] checkbox2',1,0,'L',0); 

と結果は次のようになります - fpdf table example

+0

セルを行うことができる場合、私は、TCPDFを使用する開いています関数は、コンテンツの長さがセルの幅を超えた場合、セルの内容をラップしません。あなたがアドレスを持っていて、セルを使って表示するならば、それはページから逃げるでしょう。これをどうやって解決するのか知っていましたか?私はMultiCellを使用していますか? –

1

助けたおかげで、これは私の仕事:

$this->Cell(40,5,' ','LTR',0,'L',0); // empty cell with left,top, and right borders 
$this->Cell(50,5,'111 Here',1,0,'L',0); 
$this->Cell(50,5,'222 Here',1,0,'L',0); 

       $this->Ln(); 

$this->Cell(40,5,'Solid Here','LR',0,'C',0); // cell with left and right borders 
$this->Cell(50,5,'[ o ] che1','LR',0,'L',0); 
$this->Cell(50,5,'[ x ] che2','LR',0,'L',0); 

       $this->Ln(); 

$this->Cell(40,5,'','LBR',0,'L',0); // empty cell with left,bottom, and right borders 
$this->Cell(50,5,'[ x ] def3','LRB',0,'L',0); 
$this->Cell(50,5,'[ o ] def4','LRB',0,'L',0); 

       $this->Ln(); 
       $this->Ln(); 
       $this->Ln(); 
関連する問題