[thelist] Serving PDFs

Chris Price chris.price at choctaw.co.uk
Tue Feb 20 05:11:05 CST 2007

I'm attempting to serve pdfs using a slightly modified Harry Fuecks' 
script and I'm running into problems with IE 7.

The script looks like this:

$mimeType = "application/$type";
        if (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE 5') or
            strpos($_SERVER['HTTP_USER_AGENT'], 'Opera 7')) $mimeType = 
        header("content-disposition: attachment; filename = \"$fileName\"");
        header("content-type: {$mimeType}");
        header("content-length: {filesize($fileName)}");

I have no problems opening the files (in Firefox on Mac) but my client  
(on IE7) cannot open the files directly or  when they've been downloaded 
to his desktop.

Any ideas?

Kind Regards
Chris Price


chris.price at choctaw.co.uk

Tel. 01524 825 245
Mob. 0777 451 4488

Beauty is in the Eye of the Beholder
while Excellence is in the Hand of the Professional

-+- Sent on behalf of Choctaw Media Ltd -+-

Choctaw Media Limited is a company
registered in England and Wales
with company number 04627649

Registered Office:
Lonsdale Partners,
Priory Close,
St Mary's Gate,
Lancaster LA1 1XB
United Kingdom

More information about the thelist mailing list