Re: FIle_PDF
| From: | Marko Djukic | Date: | Mon, 06 Jun 2005 09:10:19 +0000 |
| Subject: | Re: FIle_PDF | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-19480@lists.php.net to get a copy of this message | ||
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