download a pdf file

N

news.surewest.net

GlacierI'm trying to download a pdf file using the a href tag: <a
href="../documents/test.pdf"> but instead of downloading it just opens up in
adobe reader. Is there a way to cause a download? Thanks - Rick
 
B

Beauregard T. Shagnasty

news.surewest.net said:
GlacierI'm trying to download a pdf file using the a href tag: <a
href="../documents/test.pdf"> but instead of downloading it just
opens up in adobe reader. Is there a way to cause a download?
Thanks - Rick

Right-click on the link and choose "Save Target As.." or whatever your
unnamed browser suggests. Maybe "Save Link As.."
 
D

dorayme

"news.surewest.net said:
GlacierI'm trying to download a pdf file using the a href tag: <a
href="../documents/test.pdf"> but instead of downloading it just opens up in
adobe reader. Is there a way to cause a download? Thanks - Rick

Yes, right click or (on a Mac with one button mouse) control click and
save to somewhere on your hard disk.
 
T

Travis Newbury

GlacierI'm trying to download a pdf file using the a href tag: <a
href="../documents/test.pdf"> but instead of downloading it just opens up in
adobe reader. Is there a way to cause a download? Thanks - Rick

Yes, you can force it to download with the Flash and the FileReference
object. and some server side code.
 
H

Harlan Messinger

Travis said:
Yes, you can force it to download with the Flash and the FileReference
object. and some server side code.

Whether the user wants to download it or not! That'll show your users
whose boss!
 
J

Jonathan N. Little

Travis said:
Yes, you can force it to download with the Flash and the FileReference
object. and some server side code.

If you're going through all that trouble just set the the content
disposition to attachment in the header via server-side (of your choice)
and no client plugins required.
 
T

Travis Newbury

Whether the user wants to download it or not! That'll show your users
whose boss!

The ability is very useful when working with web based training where
you may want the user to download or upload multiple files. It saves
them a lot of time when they can use the computer's file system rather
than right clicking on each and saying "save as" for each. Kind of a
file downloader if you will, but you can build it into a webpage, or a
Flash application. The people that use it seem to like it a lot
because it saves them time and it is easy to use.
 
T

Travis Newbury

If you're going through all that trouble just set the the content
disposition to attachment in the header via server-side (of your choice)
and no client plugins required.

No, we are going through that trouble to allow a simple way for the
user to download or upload multiples training files. (I am sure there
are other non training applications, but I have never implemented
one) And the server side code is used for uploading not downloading.

Would your method use the browser to download or does it bring up the
OS file system?
 
S

Sherman Pendley

news.surewest.net said:
GlacierI'm trying to download a pdf file using the a href tag: <a
href="../documents/test.pdf"> but instead of downloading it just opens up in
adobe reader. Is there a way to cause a download? Thanks - Rick

Configure your server to return content type application/octet-stream for
PDF files instead of application/pdf.

sherm--
 
J

Jukka K. Korpela

Scripsit Travis Newbury:
Yes, you can force it to download with the Flash and the FileReference
object. and some server side code.

An amazing idea. All that you need now is just total and totalitarian
control over the world, forcing all people to install Flash software and
allow it to access the user's file system without asking him.

I like the idea of total control, though I'd use it for something else.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
SterlingLa
Top