PDA

View Full Version : PDF downloads?


brisa_main
10-05-2005, 10:54 AM
hey

on a site i need to have a link which when clicked will to download a PDF file.
Can anyone tell me exactly how to do this or point me in the direction of someone who can?

cheers

bkendall
10-05-2005, 12:13 PM
If you are wanting the user to simply to be able to view nd then download the pdf (right clicking or saving from the pdf controls) then all you would need to do is place the pdf on the server and then link to it like:
PDF Link (http://www.somesite.com/some.pdf)

If you only want the pdf to be downloaded, you could place it in a zip file and then link to that. there may be another way to force downloads but those are the two that are coming to my mind at the moment.

brisa_main
10-05-2005, 12:37 PM
cheers

basicly its a page with some text links with the title of the pdf when clicked i need it to be downloaded.
it wont be viewed before hand

brisa_main
10-05-2005, 12:43 PM
If you are wanting the user to simply to be able to view nd then download the pdf (right clicking or saving from the pdf controls) then all you would need to do is place the pdf on the server and then link to it like:
PDF Link (http://www.somesite.com/some.pdf)

how do i place it on the server? also will that code just fit straight in as a link? including all the a href?

bkendall
10-05-2005, 12:58 PM
you put the pdf on the server in the same way you put your other files (html pages) on the server. If you use dreamweaver all you need to do is type into the link box down in the propeties panel just like you would to create any other link.

brisa_main
10-05-2005, 01:00 PM
sweet :D

domedia
10-05-2005, 01:07 PM
brisa,
When I link to pdf's, I try to add a little pdf icon next to the link so that the user knows he's about to open a file that might take him out of the browser and open a new application (this depend on the users settings). I always appreciate this myself when I'm surfing :) Every time I happen to click on a pdf link not knowing it was a pdf, I feel like someone just hijacked me on the information highway ;)

bkendall
10-05-2005, 01:18 PM
yes good point domedia, also I normally have instructions and a link to download the pdf viewer in case the user doesn't happen to have it ( kind of rare these days but still good practice).

davidj
10-05-2005, 01:41 PM
i use pdf's all the time and must point out something...!

when downloading a PDF you have a very high risk that the PDF may open inside a users site window! Loosing your site in replace for the opened PDF

This is an Acrobat Settings option that only the user can change and can not be controlled by the web developer!

I have found that launching a popup which calls the PDF is a workaround

domedia
10-05-2005, 08:36 PM
I have found that launching a popup which calls the PDF is a workaround
I often do this too, per request (when it's not my decision ;) )

Two comments on that:
1. Sometimes the PDF file launch in the browser because the user wants it to load in the browser. Like you point out, it's a local setting on the users system.
2. If you load a new window, and the user has set PDF's to not load in browser, you've created an empty pop-up window. Some might find this confusing.

..But we're getting really picky here ;)

davidj
10-06-2005, 08:54 AM
2. If you load a new window, and the user has set PDF's to not load in browser, you've created an empty pop-up window. Some might find this confusing.

what about giving the popup a close onBlur javascript function

if PDF opens inside the popup then it wont blur

if pdf opens in acrobat then acrobat will force popup to blur which closes it

Jim_Shady
10-06-2005, 02:54 PM
Sheesh.... surely this is something more interesting that we could be talking about....! :P