/    Sign up×
Community /Pin to ProfileBookmark

help – pdf downloads

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

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@Rick_GarrisonSep 06.2003 — 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 ?
Copy linkTweet thisAlerts:
@CharlesSep 06.2003 — [font=georgia]It's a nice touch to specify the MIME type when linking to something other than HTML.[/font]

[font=monospace]<a href="someFile.pdf" type="application/pdf">Some File</a>[/font]
Copy linkTweet thisAlerts:
@kittenauthorSep 06.2003 — Thanks very much! It's not as hard as I was expecting!


I'm off to experiment.

Thanks again,

Kitten
Copy linkTweet thisAlerts:
@GavinPearceSep 07.2003 — 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.
Copy linkTweet thisAlerts:
@CharlesSep 07.2003 — [i]Originally posted by gavinnet [/i]

[B]If you want to ensure it's downloaded place them into a zip file, which will be downloaded, and the user can unzip it. [/B][/QUOTE]
[font=georgia]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.[/font]
Copy linkTweet thisAlerts:
@GavinPearceSep 07.2003 — 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.
Copy linkTweet thisAlerts:
@CharlesSep 07.2003 — [i]Originally posted by gavinnet [/i]

[B]Im guessing you could do that to force a .php to download instead of running on the server. [/B][/QUOTE]
[font=georgia]No, that's something completely different.[/font]
Copy linkTweet thisAlerts:
@GavinPearceSep 07.2003 — Ok I was totally wrong then lol.

I'll have to do some research into that.
×

Success!

Help @kitten spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...