Re: Correct headers for I.E. to open PDF?

From: Date: Fri, 03 Sep 2004 20:06:57 +0000
Subject: Re: Correct headers for I.E. to open PDF?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-195773@lists.php.net to get a copy of this message
> $pdfdoc = $__BASE_PDF_BUILD_DIRECTORY.$_GET['FID']; > > $filesize = filesize($pdfdoc); > header("Pragma: "); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); > header("Content-type: application/pdf"); > header("Content-Length: ".$filesize); > header("Content-Disposition: inline; filename=FILE.pdf"); > header("Content-Transfer-Encoding: binary"); > header("Accept-Ranges: bytes"); > > readfile($pdfdoc); > exit(); > > Why isn't it working? IE can seems to ignore these headers some times (I think it might have something to do with the .php extension). I have had success creating the file and saving it with .pdf as the extension then redirecting to that file.

« previous php.general (#195773) next »