> -----Original Message----- > From: Erwin [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 12, 2002 11:02 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Re: Displaying PDF file > > > 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.
Send these three headers: header('Content-type: application/pdf'); header("Content-Disposition: inline; filename=$file"); header("Content-Length: $length"); You need to send the length of the document, so use filesize() to get it. Also, if you had an error in the script, close the browser window and then re-open it and browse to the page again. Lastly, IE changes a POST request to a GET request on a pdf document, so you can't hit refresh on the POSTed to page. If that's what you're going, you might want to consider changing the POST to a GET ... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php