A other class, which is maybe better I will introduce here (
http://www.fpdf.org/) (reinerj)
?
What is FPDF?
FPDF is a PHP class which allows to generate PDF files with straight PHP, that is to say without using the PDFlib library. The advantage is that PDFlib requires a fee for a commercial usage. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.
FPDF has other advantages: high level functions. Here is a list of its main features:
* Choice of measure unit, page format and margins
* Page header and footer management
* Automatic page break
* Automatic line break and text justification
* Image support (JPEG and PNG)
* Colors
* Links
* TrueType
?, Type1 and encoding support
* Page compression
FPDF requires no extension (except Zlib to activate compression) and works with PHP4 (versions before 1.4 work with PHP3 too).
--
the ROS pdf class (
http://ros.co.nz/pdf/ )
There is very good documentation availlable at
http://ros.co.nz/pdf/
to make it a part of the API:
- copy the file class.pdf.inc.php and directory pdf from property/inc to phpgwapi/inc
- class.pdf.inc.php has to be edited : replace PHPGW_APP_INC with PHPGW_API_INC
--
Nicola Asuni:
Instead of FPDF or ROS, I strongly suggest to implement TCPDF.
http://sourceforge.net/projects/tcpdf
http://tcpdf.sourceforge.net
TCPDF is an Open Source PHP class for generating PDF files on-the-fly without requiring external extensions.
TCPDF is an extension and improvement of the FPDF class by Olivier Plathey.
TCPDF is already used by a large number of PHP projects such as phpMyAdmin (from 2.10), Drupal, Joomla, AIOCP, TCExam, etc.
TCPDF Main Features:
- supports all ISO page formats;
- supports UTF-8 Unicode;
- includes methods to publish some XHTML code;
- includes a method to print various barcode formats;
- supports TrueTypeUnicode?, TrueType?, Type1 and encoding;
- supports custom page formats, margins and units of measure;
- includes methods for page header and footer management;
- supports automatic page break;
- supports automatic page numbering;
- supports automatic line break and text justification;
- supports JPEG and PNG images;
- supports colors;
- supports links;
- support page compression;
- the source code is full documented;