PDF on the fly ?

From: Date: Thu, 03 Jul 2003 20:19:47 +0000
Subject: PDF on the fly ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-153927@lists.php.net to get a copy of this message
Hello! I'm trying to create a PDF file for downloading, but Acrobat cannot read the generated file. I get a "file corrupted or cannot be found", whenever I try to open the file. My script is as follow: header("Cache-control: private"); header("Content-type: application/octet-stream"); header("Content-type: application/pdf"); header("Content-Disposition: attachment; filename=file.pdf"); //sql code to retrieve data as $data echo $data //...more code //==================== As expected, the server create the pdf file and force the browser to open the save file dialog box to save the file. Acrobat,however cannot read the generated file (both online or offline). Any suggestions? Am I missing something? Please help. -john =P e p i e D e s i g n s www.pepiedesigns.com Providing Solutions That Increase Productivity Web Developement. Database. Hosting. Multimedia.

« previous php.general (#153927) next »