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.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php