ARIVAZHAGAN
ARIVAZHAGAN

Reputation: 41

Is it possible to Generate a Pdf Design by using Fpdf

enter image description hereI want to Generate a Pdf in Php Using FDPF. can we draw a table in fpdf. I want to Design a Table In the Image given Using FPDF.Is it Possible. I am new to fpdf Please help me. I want Above table design. Thanks in Advance

Upvotes: 4

Views: 2286

Answers (2)

aliasgar vanak
aliasgar vanak

Reputation: 684

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

Upvotes: 0

steven
steven

Reputation: 4875

you should download an addon called PDF_MC_TABLE or copy it from here: 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();

Upvotes: 1

Related Questions