Re: Displaying PDF file
| From: | Erwin | Date: | Thu, 12 Sep 2002 15:02:17 +0000 |
| Subject: | Re: Displaying PDF file | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-116163@lists.php.net to get a copy of this message | ||
Joseph Szobody wrote:
> Thanks Erwin, that helps.... but I'm still not getting it to work.
> Should I still use the ....
>
> Header("Content-type: application/pdf");
>
> line?
>
> I tried using readfile() keeping the header. When I click the link to
> the PHP script that should show me the PDF, the IE status bar says
> something like "Downloading from site .....blah", then says "Done".
> Nothing happens. I'm still on the previous page. No error, no pdf
> file... nothing.
>
> I removed the Header line, and IE prompted me to download the file.
> That's not what I want.
>
> What am I doing wrong?
That's weird, you should keep the
Header( "Content-Type: application/pdf" );
line...
You could also try to add the
Header( "Content-Disposition: attachment; filename=whatever.pdf");
and
Header( "Content-Disposition: filename=whatever.pdf" );
HTH
Erwin