PHP and MySQL Web Development - P149: PHP and MySQL Web Development teaches the reader to develop dynamic, secure, commercial Web sites. Using the same accessible, popular teaching style of the first edition, this best-selling book has been updated to reflect the rapidly changing landscape of MySQL and PHP. | 712 Chapter 30 Generating Personalized Documents in Portable Document Format PDF Software to Create PDF Programmatically Support for creating PDF documents is available from within PHP. Two different function libraries are available with similar intentions. As they rely on external libraries neither is compiled in to PHP by default. PHP s PDFlib functions use the PDFlib library available from http The ClibPDF functions use the ClibPDF library available from http Both these libraries are provide an API of functions to generate a PDF have elected to use PDFlib because it seems to be updated and maintained more regularly. It is worth noting that neither of these libraries are Free Software. Both permit some non-commercial use without charge but require a license fee if you intend to provide a commercial service using them. You can see if PDFlib is already installed on your system by checking the output of the function phpinfo . Under the heading pdf you can find out if PDFlib support is enabled as well as the version of PDFlib used. If you intend to use TIFF or JPEG images in your PDF documents you will also need to install the TIFF library available from http and the JPEG library available from ftp graphics jpeg On a Unix system these pieces of software are installed in the usual way using configure and make. You will need to recompile PHP with the switch --with-pdflib. On a Windows server the PDFlib DLL is bundled in the PHP Zip file so you will just need to uncomment the extension in your file. Solution Overview We will produce a system with three possible outcomes. As shown in Figure we will ask quiz questions assess the answers and then generate a certificate in one of three ways We will generate an RTF document from a blank template. We will generate a PDF document from a blank template. We will generate a PDF document programmatically via PDFlib. Solution Overview .