【发布时间】:2017-04-14 06:39:52
【问题描述】:
使用下面的代码,PDF 以无序的方式出现并相互覆盖。如何解决这个问题以及如何在 fpdf 中使用 MultiCell?
<?php
require_once("fpdf/fpdf.php");
$mypdf = new FPDF();
$mypdf -> AddPage();
$mypdf -> SetTitle("This is for Testing",false);
$mypdf -> SetFont("Arial","B","8");
$mypdf -> SetTextColor(253,12,120);
$mypdf -> SetDrawColor(253,12,120);
$mypdf -> Cell(20,10,"Name",1,0,"L");
$mypdf -> Cell(30,10,"Address",1,0,'');
$mypdf -> Cell(30,10,"Phone Number",1,0,'');
$mypdf -> Cell(20,10,"Email Id",1,0,'');
$mypdf -> Cell(20,10,"State",1,0,'L');
$mypdf -> Cell(20,10,"Gender",1,1,'L');
$mypdf -> Cell(20,10,"Jackson",1,"0","");
$mypdf -> Cell(30,10,"My Adress is Different",1,"0","");
$mypdf -> Cell(30,10,"1234567890",1,"","0",false);
$mypdf -> Cell(20,10,"xxxx1234x@gmail.com",1,"","L",false);
$mypdf -> Cell(20,10,"xxxx xxxxx",1,"","L",false);
$mypdf -> Cell(20,10,"Male",1,"","L",false);
$mypdf -> Output();
?>
【问题讨论】:
-
我怎么写,像这样 $mypdf -> MultiCell (20,10,"xxxx1234x@gmail.com",1,"","L",false);