Click to See Complete Forum and Search --> : help - pdf downloads


kitten
09-06-2003, 10:53 AM
Hi everyone,
I'm new here - I really need some help with the site I am setting up.

Basically I want people to be able to download pdfs from my web site when they click on a link.

I have absolutely no idea how to do this - you know when the download box comes up and you select whether youd like to save/open the pdf, etc - well that's what i'm trying to achieve!!

I would be greatful of any help!

Thanks
Kitten

Rick_Garrison
09-06-2003, 11:26 AM
Its just like a normal link:

<a href="Nameoffile.pdf">Click Here to Download PDF!</a>


Just be sure that you have the proper link to get to your file on the internet (the nameoffile.pdf should be replaced by your file's name- and if it's in a subdirectory on your server, be sure to include the proper link).

Let me know if it helps :)

Charles
09-06-2003, 11:52 AM
It's a nice touch to specify the MIME type when linking to something other than HTML.

<a href="someFile.pdf" type="application/pdf">Some File</a>

kitten
09-06-2003, 01:09 PM
Thanks very much! It's not as hard as I was expecting!


I'm off to experiment.

Thanks again,
Kitten

GavinPearce
09-07-2003, 07:19 AM
Only problem you might have is some versions of IE display the PDF in the browser rather than downloading it.

If you don't mind wheter of not it's download or just displayed leave it as .pdf.

If you want to ensure it's downloaded place them into a zip file, which will be downloaded, and the user can unzip it.

Charles
09-07-2003, 07:37 AM
Originally posted by gavinnet
If you want to ensure it's downloaded place them into a zip file, which will be downloaded, and the user can unzip it. Or you can have your server state that the MIME type of the file is "application/octet-stream". You'll have to talk to your server folks to find out how to do that.

GavinPearce
09-07-2003, 07:39 AM
jhat just answered a question I was about to ask. I wasnt sure if you could force a file to download. Im guessing you could do that to force a .php to download instead of running on the server.

Charles
09-07-2003, 07:41 AM
Originally posted by gavinnet
Im guessing you could do that to force a .php to download instead of running on the server. No, that's something completely different.

GavinPearce
09-07-2003, 07:49 AM
Ok I was totally wrong then lol.

I'll have to do some research into that.