Friday, August 15, 2008


If you need to create PDF files from PHP, head over to FPDF and look at their library.
It is free and works well.
Here is a quick suck-n-see example:

require_once('fpdf.php'); $testPDF =new FPDF(); $testPDF->AddPage('P'); // add a Portrait page $testPDF->SetFont('Courier', 'BUI', 24); // set Courrier, bold + italic + underline, 24points $testPDF->Cell(50, 5, 'Yiassou Nafti!'); $testPDF->Output(); ?>
Easy! I've also found a related tool, FPDI, which is described as
FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF, which was developed by Olivier Plathey
If you do end up using any of the above, let the authors know; they'd appreciate acknowledgement.


ps: Comments and/or links to this article are most welcome! 

No comments:

Post a Comment