使文本显示在图像之后而不是图像上方


making text appear after an image instead of over it

<?php
include('fpdf.php');
$pdf = new FPDF();
$pdf->AddPage();
$pdf->Image('http://chart.googleapis.com/chart?cht=p3&chd=t:60,40&chs=250x100&chl=Hello|World',60,30,90,0,'PNG');
//$pdf->Ln();
$pdf->SetFont('Times','',12);
for($i=1;$i<=2;$i++)
    $pdf->Cell(0,10,"Printing line number $i",0,1);
$pdf->Output();

"打印行号 x"文本显示在图像上方 - 而不是在其下方。任何想法如何让它出现在图像之后?注释掉的$pdf->Ln()似乎没有区别。

谢谢!

使用 $pdf->SetX()SetY()SetXY() 来移动"光标"位置。您可以使用GetY()获取当前垂直位置,并使用SetY()将图像高度添加到该位置。