03-31-2009, 05:52 PM
|
#15 (permalink)
|
|
The Frequenter
Join Date: Dec 2007
Location: Bucharest, Romania
Posts: 438
Thanks: 3
|
Here's some of my code, maybe it helps:
PHP Code:
$pdf = new FPDF('P', 'mm', 'A4'); $pdf->AddPage(); $pdf->SetFont('Arial','B', 16); $pdf->Cell(40, 10, 'Some title'); $pdf->Cell(-40); $pdf->SetFont('Arial','', 12); $pdf->Cell(0, 40, 'Field: 14'); $pdf->Cell(-190); $pdf->Cell(0, 55, 'Field: xx'); $pdf->Cell(-190); $pdf->Cell(0, 70, 'Field: 22'); $pdf->Cell(-190); $pdf->Output('file_name.pdf', 'D');
I hope you get the main idea. You practically add "blocks" on top of each other. Remember that an A4 page has 298mm x 210mm. Remember to add the line height to each line you add.
__________________
I have optimistic thoughts, even though sometimes (if not always) life's a bitch.
|
|
|
|