13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

792 Chapter 32 Generating Personalized Documents in Portable Document Format (PDF)<br />

Generating a PDF Document Using PDFlib<br />

PDFlib is intended for generating dynamic PDF documents via the <strong>Web</strong>. It is not strictly<br />

part of <strong>PHP</strong>, but rather a separate library, with a large number of functions intended to<br />

be called from a wide variety of programming languages. Language bindings are available<br />

for C, C++, Java, Perl, Python,Tcl, <strong>and</strong> ActiveX/COM.<br />

PDFlib is officially supported by PDFlib GmbH.This means that you can refer to<br />

either the <strong>PHP</strong> documentation at http://www.php.net/en/manual/ref.pdf.php.<br />

or download the official documentation from http://www.pdflib.com.<br />

A Hello World Script for PDFlib<br />

After you have <strong>PHP</strong> <strong>and</strong> have installed it with PDFlib enabled, you can test it with a<br />

simple program such as the Hello World example in Listing 32.5.<br />

Listing 32.5<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!