Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hi all ,

  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 .

- weetat

Re: PDF in PHP

weetat.yeo@gmail.com wrote:
Quoted text here. Click to load it

Have a look at the output buffering functions like ob_start,  
ob_get_contents etc

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 !

Site Timeline