HTML2FPDF - 定位writeHTML输出

时间:2011-08-18 17:32:11

标签: php html pdf fpdf

我有以下代码:

function convert($contents, $name){ 
  echo($link); //prints nothing
  $pdf=new HTML2FPDF();
  $pdf->AddPage();
  $pdf->SetFont('Arial','B',16);
  $pdf->Cell(40,10, "Entry Report");
  $pdf->SetFont('Arial', '', 12);
  $pdf->Cell(100,10, $_SESSION['currdate']);
  $pdf->WriteHTML( $contents );
  $pdf->Output($name, "D");
}

默认情况下,writeHTML内容位于顶部的PDF中...如何通过writeHTML函数来抵消pdf中放置的wrriten内容......

1 个答案:

答案 0 :(得分:1)

FPDF中,您可以使用SetX()SetY()SetXY()