[thelist] PHP, PDF and IE7

Bob Boisvert webdad at tampabay.rr.com
Mon Mar 12 09:50:23 CDT 2007


I was just reading up on this the other day. IE7 won't load a .PDF, from
what I read, this is by design and not a bug, this comes from Microsoft's
site. I wasn't able to find out anything further than that unfortunately or
find a solution. I know this isn't much help but before you beat yourself up
with coding, I thought I would mention this.

If there is a solution to this, I would be very much interested.


This PHP code:

if ($fp = fopen($filename, 'rb')) {
$len = filesize($filename);
header('Content-Title: Mishpacha PDF Article');
header('Content-Type: Mishpacha PDF Article application/pdf');
header("Content-Length: $len");
} else {
echo 'Invalid File?<br>';
echo $file[filename];

works to deliver a PDF in FF2 and IE6. In IE7, however, Windows XP 
doesn't seem to realize that it's a PDF file.


More information about the thelist mailing list