Do you have a question? Post it now! No Registration Necessary. Now with pictures!
August 23, 2006, 6:55 am
rate this thread
I have trying to convert a PHP file to PDF.
Search the net , found HTML_toPDF open source tools , which convert
html file to PDF.
Tried to product , it work seamless without any error.
Howeve , for my case , when user click the search button to 'search
items' , the data are display in the listall.php. On listall.php ,
there are 'print' button which print the listall.php.
Because the HTML_toPDF only convert html to PDF, i need to find a way
how to convert the listall.php to listall.html dynamically before i
called the HTML_toPDF functions.
Anyone have ideas how to do it or suggestions is much appreciated .
Re: PDF in PHP
Have a look at the output buffering functions like ob_start,
Run the page like you normally would, but add the ob_start at the
beginning and instead of printing to the screen you capture all you
output at the end.
Save to a temporary html file & presto !