# Create PDF on the Fly<img src='http://ram.genetics.ucla.edu/j00/a.png'>

My goal is to create <span class="caps">PDF</span> on the fly using <span class="caps">PHP</span>. I use php to query the database, the result from the database will be listed in a table, and this view need to be output as a pdf file.

The requirements are 1) it needs to run on sun solaris. 2) need to write dynamic data into pdf right at the point user viewing the data. 3) need to work with <span class="caps">PHP</span>.

The best product so far is the PDFLib. ([www.pdflib.com](http://www.pdflib.com)). They have PDFLib family, requires license as $1999.00 per machine. But it does very sophisticated things, such as extract text from <span class="caps">PDF</span> allows searching, import <span class="caps">PDF</span> to edit etc. Easy to use. But the license is too expensive. They do come in free version call PDFLib Lite, however, that require build from source, which needs a lot of C programming skills.

The second one is ([http://sourceforge.net/projects/pdf-php](http://sourceforge.net/projects/pdf-php)). It does many things that generally enough for many users.

<span class="caps">DOMPDF</span> also works pretty well and is is free ([http://www.digitaljunkies.ca/dompdf/examples.php#demo](http://www.digitaljunkies.ca/dompdf/examples.php#demo)).