Creating and Manipulating PDFs with PHP and FPDF
Mar 11, 2011, 22:02 (0 Talkback[s])
(Other stories by Jason Gilmore)
How to Help Your Business Become an AI Early Adopter
"Installing FPDF FPDF is an open source PHP class released under
a permissive license, which indicates that the software can be used
for any purpose, commercial or otherwise. Bundling its PDF
manipulation functionality into a single class, using FPDF is as
simple as referencing it within your PHP script using the require
statement. Further, although the library is object-oriented, no PHP
5 specific features are required meaning it is compatible with PHP
4 installations on the off chance any still exist.
"You can download the latest version from the FPDF website.
Unzip the download and place the directory within PHP's
include_path. Presuming you're modifying the include_path directive
from within the php.ini file and PHP is installed as an Apache
module, don't forget to restart your web server.
"Creating Your First PDF
"With FPDF installed, let's create a simple PDF file. The
following script will create a single-page PDF of paper size A4 and
portrait orientation using points as the unit of measurement. On
this single page a 16-pt Times New Roman boldface header containing
the text PDF Generation Made Simple will be added and