RE: [PHP] header() function for displaying an opened PDF document.
| From: | Bertrand Moulard | Date: | Mon, 13 Oct 2003 22:40:19 +0000 |
| Subject: | RE: [PHP] header() function for displaying an opened PDF document. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-166032@lists.php.net to get a copy of this message | ||
Might not be connected at all, but I had a similar problem with pdf stored
in a postgreSQL database as large object. The content type was set to pdf,
but ie wouldn't open it. It turned up that it was because there was a CRLF
at the end of one of my script, which spoiled the whole output. Pretty dumb
thing, but it kept me busy for a good hour. If you're desperate for a
solution, look for an unwanted new line somewhere in your file out of the <?
?> tags.
good luck
.b
-----Original Message-----
From: Scott Fletcher [mailto:scott@abcoa.com]
Sent: 13 October 2003 22:15
To: php-general@lists.php.net
Subject: [PHP] header() function for displaying an opened PDF document.
I seem to be having problem with sending the PDF document to the browser to
be open on screen. I kept getting the error message, it say 'Windows cannot
open this file'. Here's my sample script, so what am I doing wrong?...
--snip--
header("Content-Type: application/pdf");
header("Content-Length: '40736'");
header("Content-Disposition: inline; filename='junk.pdf'");
--snip--
Thanks,
Scott F.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php