[thelist] Problem with PDF Download via PHP

Tony Grimes info at scribenewmedia.com
Wed Dec 24 12:16:36 CST 2003

My users are getting "File not Found" errors from Acrobat when they try to
open PDFs "from their current location" via my PHP redirect script. The Word
documents are downloading fine. Here is the page with the downloads:


Here is the relevant code I'm using for the download script:

header("Content-type: $mime_type"); //$mime_type == application/pdf
header("Content-Length: $file_size");
header ("Content-Disposition: attachment; filename=".$file_name );

Does anyone know of a better way to do this? I tried sending a generic
octet-stream mime type, but that didn't work. Is this an issue with IE or

Any help would be appreciated.


More information about the thelist mailing list