View Full Version : download pdf

Mar 21st, 2009, 04:37 PM
this automaticaly opens pdf in browser window, how to force it to auto open download box ?

<a href = "../downloadable_files/test.pdf">click here</a>

Mar 21st, 2009, 05:39 PM
AddType application/octet-stream .pdf .PDF into your .htaccess file.

Mar 21st, 2009, 07:58 PM
Interesting, never knew this. Thanks.

abduraooft, is there any other special configuration I would need to perform on my Apache web server for this to work, or is it standard out of the box stuff?

Apr 3rd, 2009, 05:38 AM
was reading somewhere that use of htacc... files is inefficient.

So puted this into web.xml


and it works, for all pdf-s ewerywhere doh, which is what I dont want obviously.

I presume something like this should be in server.xml, including path to specific dir, Any tips for that ?

Apr 3rd, 2009, 12:11 PM
putting ths in server.xml is ok

<Directory />

hmm, what is wrong here ? puting anything behind / causes this

<Directory /web...> <extension>pdf</extension>

-->org.xml.sax.SAXParseException: Element type "Directory" must be followed by either attribute specifications, ">" or "/>".