PDA

View Full Version : Newbie in need of help...



vicgiff66
10-16-2009, 12:50 PM
I am a total newbie and need help on the hyperlink code for a pdf file.. I thought I knew what to do, but it isnt working.. any suggestions?:confused:

LinGNUbie
10-16-2009, 01:20 PM
<a href="http://url/of/pdf/file.pdf">PDFFile.pdf</a>

So if your file was located in a subfolder named shared on http://www.mysite.com/ it would be

<a href="http://www.mysite.com/shared/pdffile.pdf">PDFFile.pdf</a>

and would start an automatic download of the file when clicked by site visitors.

felgall
10-16-2009, 02:04 PM
I am a total newbie and need help on the hyperlink code for a pdf file.. I thought I knew what to do, but it isnt working.. any suggestions?:confused:

If the PDF is in the same folder on your site as the HTML page that is calling it then just place the filename in the href. You only need to start adding other things to it if it is in a different folder (that's the same with all file types). There is nothing special about .pdf files - they can be references anywhere that you reference .gif, .jpg, and .png files and are referenced exactly the same way.

MrDelish
10-16-2009, 02:11 PM
I am a total newbie and need help on the hyperlink code for a pdf file.. I thought I knew what to do, but it isnt working.. any suggestions?:confused:

Okay, let's say you have a page called test.html and you want to link it to myfile.pdf. We'll assume these are in the same folder on the server (/public_html). Here is a sample of the code you could use in this instance:


<a href="myfile.pdf">Click here to see my PDF file!</a>

That would go somewhere in the HTML body. Make sure that the file names match exactly, as they are case sensitive.