File_PDF generation using pure PHP without external libs
From the Horde framework and based on the FPDF (http://www.fpdf.org) class.
Currently supports:
- Text/fonts
- Margins/pagebreaks
- Colours fill/draw
- Lines/line widths/circles
- Compression/display modes
- Links/images....
Sample code:
<?php
require_once 'PDF.php';
$pdf = &PDF::factory('P', 'mm', 'a4');
$pdf->open();
$pdf->addPage();
$pdf->setFont('Arial', 'B', 20);
$pdf->setFillColor('rgb', 0, 0.8, 0.2);
$pdf->text(100, 110, 'Hello');
$pdf->setFillColor('rgb', 0.8, 0.5, 0.5);
$pdf->setFont('Courier', '', 40);
$pdf->text(110, 120, 'World');
$pdf->output('mypdf.pdf', true);
|