Forum Moderators: open

Message Too Old, No Replies

Link to download pdf

Download pdf to the desktop or user's computer

         

gsinswai

8:07 pm on Dec 7, 2006 (gmt 0)

10+ Year Member



I'm looking for HTML link to PDF file.

Usually when there's a link to the PDF file, the link will open the PDF file in the browser.

I'm wondering if I can have a link to the PDF file, and let the user download the PDF file to the desktop or user's computer?

eelixduppy

8:32 pm on Dec 7, 2006 (gmt 0)



Welcome to WebmasterWorld!

I believe it's based on settings on the clients computer.

If they want to save it they can right click and choose "Save Link As"...on Windows anyway ;)

choster

9:28 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



One workaround is to ZIP the file, which will essentially force the user to download it and open it outside the browser. It is not a user-friendly solution of course.

Terabytes

8:41 pm on Dec 7, 2006 (gmt 0)

10+ Year Member



the opening of the .pdf file is the default action when the link is clicked...(set by the users computer 99% of the time)

you could make a note on the page...
"right click, and "save as..."

or...the only other option would be to zip the .pdf and offer the zipped file for download...then the user normally gets a text box asking if they want to "open" or "save" the file...

hope that helps..
Tera

[edited by: encyclo at 11:30 pm (utc) on Dec. 7, 2006]
[edit reason] spliced from duplicate thread [/edit]

bedlam

8:58 pm on Dec 7, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If your website is hosted on an Apache server, and your host permits the use of .htaccess files, you can try something like this:

AddType application/force-download .pdf

-b

phranque

12:01 am on Dec 8, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



the best you can do to provide "normal" behavior is to properly identify the mime type (application/pdf) and use a the standard filename extension (.pdf).
you cannot or should not control or override browser settings from the server.

kaled

2:42 am on Dec 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If anonymous ftp is permitted, you can link to the file using ftp://www.yourdomain.com/doc.pdf

I've never used this, but I think it works.

Kaled.