2013-06-13 40 views
0

我刚刚开始使用fphp并设法根据需要获取pdf文档,但只有一个问题。目前,我有这样的:在fpdf中定位单元格

Bars

我用得到它的代码是:

$pdf->MultiCell(0,5, "Feedback: " ."",0, "J"); 
$pdf->SetFillColor(185, 44, 146); 
$pdf->Cell($obsObservation1,5,"",0,1,1,"L", "true"); 

$pdf->MultiCell(0,5, "Challenge: " ."",0, "J"); 
$pdf->SetFillColor(197, 198, 200); 
$pdf->Cell($obsObservation2,5,$currentY,0,1,1,"L", "true"); 

我想有两个酒吧文字的右侧,与左侧边线。这可能吗?

我意识到我可能不应该使用细胞,但我似乎无法找到正确的选择。

+0

这可能是值得阅读这篇相关文章:[FPDF细胞定位(http://stackoverflow.com/questions/13153612/fpdf-cell-positioning) – nickhar

+0

完美 - 谢谢。 – RGriffiths

回答

0

不使用多节...

只是做普通的细胞....

PS:这可能不会工作权利,伊夫键入它,但它的东西沿着这些线路.... 播放用它,你会得到它。 :)

$pdf->SetY(0); 
$pdf->SetFont("Arial","B","13"); 
$pdf->SetXY(5, $pdf->y + 5); 
$pdf->Cell(5, 5, "Feedback :"); 

$pdf->SetY(0); 
$pdf->SetXY(15, $pdf->y + 5); 
$pdf->Cell($obsObservation1,5,"",0,1,1,"L", "true"); 


$pdf->SetY(0); 
$pdf->SetFont("Arial","B","13"); 
$pdf->SetXY(5, $pdf->y + 15); 
$pdf->Cell(5, 5, "Challenge :"); 

$pdf->SetY(0); 
$pdf->SetXY(15, $pdf->y + 15); 
$pdf->Cell($obsObservation2,5,"",0,1,1,"L", "true");