Another -- and certainly much easier -- way to generate PDF files in PHP is with phpLiveDocx.

http://www.phplivedocx.org/articles/...o-phplivedocx/

From the component's web site:

"phpLiveDocx allows PHP developers to generate documents by combining structured data from PHP with a template, created in a word processor. The resulting document can be saved as a PDF, DOCX, DOC or RTF file. The concept is the same as with mail-merge."

I use it to generate invoices in an online store, using a template, stored as DOC. The invoice is saved as a PDF file.

Leo