Sending Output Buffer contents to PDFLib

From: Date: Thu, 17 May 2001 02:26:40 +0000
Subject: Sending Output Buffer contents to PDFLib
Groups: php.general 
Request: Send a blank email to php-general+get-53145@lists.php.net to get a copy of this message
---------------------------------------------------------------------------- ----------------- Disclaimer: The information contained in this email is intended only for the use of the person(s) to whom it is addressed and may be confidential or contain legally privileged information. If you are not the intended recipient you are hereby notified that any perusal, use, distribution, copying or disclosure is strictly prohibited. If you have received this email in error please immediately advise us by return email at postmaster@normandy.com.au and delete the email document without making a copy. ---------------------------------------------------------------------------- ----------------- For HTML->PDF have a look at www.easysw.com/htmldoc/ very nice. I was using this before output buffering to take my HTML output to a PDF. But im sure you could pipe the data to it to produce the PDF. You may have to filter some of your HTML on the way and make sure you have correct HTML (closed tags on <td> etc). I found i had to write a file and get HTMLDoc to read the file instead of piping it through, i also found that some combinations of Browsers and Acrobat would try to read it twice (thus your script running twice) or not work at all if you just sent the PDF headers then pushed the PDF data to the client. (I never found out why, but as a test get your script to append to a log file to see how many times it runs for one click). The simplest solution is to write the file to the web root somewhere then redirect the user there (eg: write it to mysite.com/pdf/pdf-123435456.pdf) or make a link saying your file is ready here. I found this to be the most reliable method. mn Mark Nold markn@enspace.com <mailto:markn@enspace.com> Senior Consultant   Change is inevitable, except from vending machines.

« previous php.general (#53145) next »