Return to Help Center

Welcome to the Bravenet Help Forums. Here you can chat and meet other Bravenet Members. Please do not post advertisements.

Forum: Web Design Discussions
Start a New Topic 
  
Author
Comment
Download a pdf

Hi
Sorry if this has been done before - I'm new here.

Can anyone tell me how to insert a button or instruction which when clicked will take the viewer straight into a download of a pdf?

I've got my pdf uploaded and ready to go - just need to show how visitors can go straight to download rather than taking them to a view.

Thanks!

Re: Download a pdf

http://personalweb.about.com/od/linkingideas/a/408pdffiles.htm

Re: Download a pdf

Many thanks for the reply - and sorry if I'm being slow. I looked at this link and as far as I can see it shows how to link to a pdf on one of my web pages. That is fine - I can do that. What I want is a link which will then open a window (in windows XP anyway) which asks 'Where do you want to download the file to?' - I don't need my site visitors to actually see the pdf file at this stage.

Hope I've explained myself!

Thanks

Re: Download a pdf

Sorry but I understood that this portion explained how your visitors should be able to view it, maybe wrong but I will test it out on mine.

Quote from link
Add The Link to the pdf File - Add the code to the place where you want the link to the pdf file to show up in your HTML code. It's actually the same link code that you would use for a normal Web page link. You can make the text for the pdf file link say anything you want it too.
example
•Your Web site is hosted at Freeservers

•The username for your Web site is "sunny"

•Your Web site is located at http://sunny.freeservers.com

•You uploaded the pdf file to the main directory in your file manager on your Web site

•The pdf file is called "flowers.pdf"

•The text you want the reader to click on to download the pdf file is "Click here for the pdf file called flowers."

•Your code will look like this:


Click here for the pdf file called flowers.


•If you had uploaded the pdf file to a folder called "fun", the code for the link to the pdf file would look like this instead:
Click here for the pdf file called flowers.

Re: Download a pdf

If you click Quote on my last post you can see the full coding

Re: Download a pdf

Dave
Click on my website and near the top you will see


Click here for the pdf file called Paula.

Is this what you are wanting ??

Re: Download a pdf

The Paula file simply opens for me.

But I think we may be on the wrong track. I believe there is a way (possibly javascript) to prevent a file from opening, rather than letting the visitor choose.

But surely you don't want to force people to save a copy first if they wish to look first? The standard link gives people a choice: You left-click to view (if your system is set up that way, if you don't have the software, viewing isn't an option). You right-click - then "save linked content as..." to save it.

Of course you may have visitors who don't know that. But they are likely to be fewer than those with javascript disabled, for instance. And all you need to do is at a line of text to explain how.

Re: Download a pdf

Corwings
Having read your post and Daves post again then I could be on the wrong track but agree with your post

Re: Download a pdf

Thanks for all the advice so far - I haven't had time to work through it all yet. But just to confirm, my visitors can look at my file elsewhere in the site - it is on one of the regular pages. But if they decide to download a copy for themselves, then that is where my need for a separate Download link comes in.

Thanks again for your interest.

Re: Download a pdf

Automatic opening is a factor of the reader's PC not of the web site. To force a save you have to deliver the file in a format that PCs do not automatically open. The most common way to do this is to zip the file.

Re: Download a pdf

This is my code

a href="http://wrexhamarea.wrexham-bowls.com/download.php.docx?file=paula.pdf">Click here to download PDF
Put a< at beginning and the opposite at the end

Have a look at the web site

Re: Download a pdf

That didn't work so well. In 3 different browsers I got this:
>Photobucket
In Explorer my browser downloaded something called download.php.zip. If it contains a pdf file, I haven't been able to find it yet.

The most important point here must surely be:

An absolutely normal link to a file can be both a link to view it (if the browser does that) or a link to download. The visitor chooses what to do!

Re: Download a pdf

Thanks for the continued interest in this.

I guess that my need is a bit idiosyncratic, but I want to mimic the options given when (say) you visit a site like Adobe and you are offered links which say - 'Click here to download' .I know this applies to downloaded programmes but on my site the files in question do not look so good on regular web pages (with the theme I have chosen) and so I want to offer visitors the option of going straight to downloading their own copies.

Thanks again

Re: Download a pdf

Corwings
Sorry the link does not work I can't get it to do it but here is the link for instuctions
Notice the first one says right Click

http://www.computerhope.com/issues/ch001113.htm

Re: Download a pdf

Glyn, you seem to have created a file called download.php.docx. Maybe you tried to do it in Word instead of notepad? Don't, ever. Word is for writing printed documents.

But also please note that 1,2,3 on the page refered to are not step 1, step 2 etc. They are alternatives. And alternative 1 (I know, I'm repeating myself) is definitely the simplest (for visitors and webmaster both) and best way to do it.

Re: Download a pdf

Thanks for that and I agree that alternative 1 is the answer, I will now remove from my site as it was only as a test and I don't need it if people want to download my files they know how to do it either right click or copy and paste.

Yes I did use word

Re: Download a pdf

This site has a lot of downloads. It is a school site so they are all whizkids. have a look how they do it. click on my website link

http://moodle.flintshire.gov.uk/castellalun/main/downloads/