简体   繁体   English

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

[英]Is it possible to Generate a Pdf Design by using Fpdf

在此输入图像描述 I want to Generate a Pdf in Php Using FDPF. 我想使用FDPF在Php中生成Pdf。 can we draw a table in fpdf. 我们可以在fpdf中绘制一个表格。 I want to Design a Table In the Image given Using FPDF.Is it Possible. 我想在使用FPDF给出的图像中设计一个表。这是可能的。 I am new to fpdf Please help me. 我是fpdf的新手请帮助我。 I want Above table design. 我想要上面的桌子设计。 Thanks in Advance 提前致谢

you should download an addon called PDF_MC_TABLE or copy it from here: http://www.fpdf.de/downloads/addons/3/ 你应该下载一个名为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();

You can try this.. It is not the correct design for what you are looking for, but it will helpful to you to create a table. 你可以尝试这个..它不是你正在寻找的正确的设计,但它将有助于你创建一个表。

     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();

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM