Old 15-03-2007, 10:17   #1 (permalink)
pauliedog
Registered User
 
Join Date: Mar 2007
Posts: 1
Please Help!!!

Hi everyone, this my first posting.
I have a problem. I'm new to web design, just set up my first site. I would like to have visitors be able to click a button to download a .pdf file. The way it's set up right now is as soon as they click the button, the file just opens for them to save if they choose. How do I set the link so that the visitors gets prompted to download the file instead of it just opening up. Any help is appreciated. Thanks.
  Reply With Quote
Old 15-03-2007, 10:36   #2 (permalink)
weldo
now with added beard
 
weldo's Avatar
 
Join Date: Mar 2004
Location: Liverpool
Posts: 5,395
just tell them to 'right click' and Save As ...
__________________
fuck signatures
  Reply With Quote
Old 15-03-2007, 11:13   #3 (permalink)
djeglin
goober :-)
 
djeglin's Avatar
 
Join Date: Dec 2006
Location: Birmingham, UK
Posts: 539
Send a message via MSN to djeglin
Yeah. Far as I know you cant force the file to actually download and save. Is it really that much of a hardship?
  Reply With Quote
Old 15-03-2007, 17:22   #4 (permalink)
jem
Registered User
 
Join Date: Mar 2007
Posts: 9
Just for info it is possible to force a PDF to download rather than open using asp.Net. If that's any use to anyone let me know and I'll pass on the code.
  Reply With Quote
Old 15-03-2007, 17:33   #5 (permalink)
pgo
Senior Member
 
Join Date: Jan 2005
Posts: 12,358
I'm sure there's a way to do it in any server-side scripting language. Probably by changing the mime type.

Or, you could make it really obnoxious for your users and zip the pdf and have them download the zip and unzip it.

Out of curiosity, why do you want to force people to download it?
  Reply With Quote
Old 15-03-2007, 17:39   #6 (permalink)
Stuzrol
Sir Digby Chicken Caesar
 
Stuzrol's Avatar
 
Join Date: Mar 2007
Posts: 41
Send a message via MSN to Stuzrol
Personal preference?
  Reply With Quote
Old 15-03-2007, 17:41   #7 (permalink)
steveb
389 ppm and rising
 
steveb's Avatar
 
Join Date: Aug 2005
Location: Järvenpää, Finland
Posts: 4,877
So they have a reminder (= advertisement) on their desktop, of course. I recently transferred all my demos and examples offsite and onto pdfs for precisely that reason. A few people will save the pdfs and see them later and... well, you know how advertsing works - repetition repetition repetition
  Reply With Quote
Old 16-03-2007, 06:32   #8 (permalink)
in8
Anna - In8 Website Design
 
in8's Avatar
 
Join Date: Mar 2007
Location: Portsmouth, UK
Posts: 5
It is possible in ASP, but prob not a good idea for a newbie....

I could find you the code if you feel it is neccessary, let me know.

Anna
In8 Website Design
  Reply With Quote
Old 16-03-2007, 18:59   #9 (permalink)
rmagnuson
Registered User
 
Join Date: Mar 2007
Location: California
Posts: 19
This is a problem with having a pdf reader installed. By default the pdf mime type gets associated with the reader and thus it opens a window to display the document.

As someone mentioned earlier, the main way around this is to change the mime type to something like application/octet-stream; but this can also have undesired effects.

The whole point of mime types is that different platforms handle content differently and it is not the job of the web developer to dictate to the user how a particular file should be used.

Your best bet would be to denote that the link is a pdf, perhaps by simply putting in brackets (link to pdf) and indicating that the user should right-click the link in order to save it to their disk.
  Reply With Quote
Old 17-03-2007, 15:32   #10 (permalink)
paulanthony
mingin dawg baitch
 
paulanthony's Avatar
 
Join Date: Apr 2004
Location: Belfast
Posts: 1,035
Send a message via MSN to paulanthony
you could also zip it up...saves with the programming..
__________________
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8