开发者

HTML2FPDF - Positioning the writeHTML output

开发者 https://www.devze.com 2023-03-29 05:59 出处:网络
I have the following code: function convert($contents, $name){ echo($link); //prints nothing $p开发者_如何学Godf=new HTML2FPDF();

I have the following code:

function convert($contents, $name){ 
  echo($link); //prints nothing
  $p开发者_如何学Godf=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");
}

By default the writeHTML content is positioned within the PDF at the top...How do I offset the wrriten content that is placed in the pdf by the writeHTML function...


In FPDF you can use SetX(), SetY() or SetXY().

0

精彩评论

暂无评论...
验证码 换一张
取 消