Code Comments
Programming Forum and web based access to our favorite programming groups.Quoting Danny Brow <dan@fullmotions.com>:
> Anyone have a working example of the File_PDF class?
>
> Thanks,
> Dan.
>
<?php
include 'File/PDF.php';
$pdf = &File_PDF::factory();
$pdf->addPage();
$pdf->setFont('Arial', '', 16);
$pdf->setDrawColor('rgb', 50,0,0);
$pdf->setFillColor('rgb', 0,0,50);
$pdf->text(100, 50, "TEXT");
$pdf->addPage();
$pdf->text(100, 150, "TEXT2");
$success = $pdf->output('mypdf.pdf');
if (is_a($success, 'PEAR_Error')) {
echo $success->getMessage();
}
--
Marko Djukic - Oblo Project
http://www.oblo.com/
tel: +39 055 343 4252
mob: +39 347 007 6313
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.