Click to See Complete Forum and Search --> : Force Download of .pdf files?


nousndthem
01-05-2004, 03:47 PM
Greetings,

I'm wondering if anyone can tell me how to create a link to a .pdf file that ***forces*** the standard file download box to open as opposed to opening the .pdf in the browser.

I realise that zipping the file would do it, but I'm dealing with a situation where I need this to be as simple as possilbe as the "normal" user of this website isn't going to be able to deal with unzippiing a file.

They're also not going to be able to deal with right clicking and
choosing "Save Target As..."

Any and all suggestions welcome. I'd love it if you'd just paste the code in your response!

Thank you,

Steve
:D

pyro
01-05-2004, 03:56 PM
Take a look at http://www.infinitypages.com/research/download.htm for a solution in PHP.

nousndthem
01-05-2004, 05:33 PM
Ummm....looked promising but when testing ie6 returns:

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:
<p><p><pre></pre>

That I don't get. It works great st the link you gave.
As a second test I took the source code ( exactly )
from the page you sent me to and same error message.

My host has php on by default.

Any thoughts?

Thanks,

Steve