PDF Extensions

PHP has several libraries for generating PDF documents. This chapter shows how to use the popular fpdf library. The FPDF library is a set of PHP code you include in your scripts with the require function, so it doesn’t require any server-side configuration or support, meaning you can use it even without support from your host.

The basic concepts of the structure and features of a PDF file should be common to all the pdf libraries, however. This library (FPDF) is available at http://www.fpdf.org.

Get Programming PHP, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.