Get ready for BLACK FRIDAY shopping starting in

Forums

This topic is locked

Force PDF to Download

Posted 03 Mar 2005 11:37:29
1
has voted
03 Mar 2005 11:37:29 Matt Bailey posted:
Does anyone know how to stop PDFs opening in the browser window when you click on a link to them? I want the user to download the files to their computer, not open them.

___________________________________
* Sorry... how do you do that again?... *

Replies

Replied 03 Mar 2005 12:23:10
03 Mar 2005 12:23:10 Vince Baker replied:
Unfortunately, the user determines what application is used to open a file format and you cannot control this but there is an extension available that forces a download....

here is a link to it, i have used it quite a few times in the past.

www.tom-muck.com/extensions/help/ForceDownload/



Regards

Vince Baker
<strong>DMX Zone Manager</strong>

[VBScript | ASP | HTML | CSS | SQL | Oracle | AS400 | ERP Logic | Hosting]
Replied 03 Mar 2005 12:45:15
03 Mar 2005 12:45:15 Matt Bailey replied:
Thanks Vince. I'll check out the extension. I did a bit more googling and found the following code which seems to be having the desired effect, but I haven't had time to test it in a variety of browsers yet. I would be grateful of your opinion.

<pre id=code><font face=courier size=2 id=code>meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" content-disposition: attachment; filename="file.pdf"</font id=code></pre id=code>

___________________________________
* Sorry... how do you do that again?... *
Replied 03 Mar 2005 12:46:36
03 Mar 2005 12:46:36 Matt Bailey replied:
Ah, the extension is for ASP and I use PHP. Never mind.

___________________________________
* Sorry... how do you do that again?... *

Reply to this topic