是否可以使用Fpdf生成Pdf设计

时间:2013-05-14 11:38:33

标签: php mysql sql pdf-generation fpdf

enter image description here我想使用FDPF在Php中生成Pdf。我们可以在fpdf中绘制一个表格。我想在使用FPDF给出的图像中设计一个表。这是可能的。我是fpdf的新手请帮助我。我想要上面的桌子设计。在此先感谢

2 个答案:

答案 0 :(得分:1)

你应该下载一个名为PDF_MC_TABLE的插件或从这里复制它:http://www.fpdf.de/downloads/addons/3/

$pdf = new PDF_MC_Table();
$pdf->Row(array("this\nis a test","with a multi\ncell"));
$pdf->Output();

答案 1 :(得分:0)

你可以尝试这个..它不是你正在寻找的正确的设计,但它对你有帮助创建一个表。

     require("fpdf.php");

$pdf->SetFont('Arial','B',16);
$pdf->SetTextColor(192,192,192);
$pdf->Cell(60,10,'Name:',1,0,'C',false,0);
$pdf->Cell(130,10,'Ali',1,1,'C');
$pdf->Cell(60,10,'Subject:',1,0,'C',0);
$pdf->Cell(130,10,'Maths',1,1,'C');
$pdf->Cell(60,10,'Maximum Marks:',1,0,'C',0);
$pdf->Cell(130,10,100,1,1,'C');
$pdf->Cell(60,10,'Marks Obtained:',1,0,'C',0);
$pdf->Cell(130,10,88,1,1,'C');
$pdf->Cell(60,10,'Percentage:',1,0,'C',0);
$pdf->Cell(130,10,88,1,1,'C');
$pdf->Output();
相关问题