# Php to pdf

**URL:** <https://forum.kirupa.com/t/php-to-pdf/308388>\
**Category:** Uncategorized\
**Created:** [April 22, 2010, 2:48am UTC](https://forum.kirupa.com/t/php-to-pdf/308388 "2010-04-22T02:48:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kay1021](https://avatars.discourse-cdn.com/v4/letter/k/c2a13f/32.png) [@Kay1021](https://forum.kirupa.com/u/Kay1021)\
**Post date:** [April 22, 2010, 2:48am UTC](https://forum.kirupa.com/t/php-to-pdf/308388/1 "2010-04-22T02:48:57Z")

</div>

I’m wondering if anyone has any examples of how to make a pdf with my mysql data.

I was trying to use FPDF or TCPDF…and i can’t find any examples that can work.

I want a table where:

- the row heights grow to suit the cell with the largest text
- the table header appears if a new page has to be created
- table is filled with data from my database but the query statement has variables in it like “SELECT \* FROM $tableName  
INNER JOIN category  
ON $tableName.cat\_id = category.cat\_id”

Trying all the examples i have found…reading all their scripts…nothing works for me!

Please help
