1. Computing

Add pdf Files To Web Sites

6 Simple Steps to Add pdf files to Web Sites

By

Have you created a pdf program using, Adobe Acrobat, that you think your readers will benefit from? Did you get permission to add a link to a pdf file on your Web site? This is how you add the pdf file to your Web site so your readers can open it or download it.

  1. Make Sure pdf Files Are Allowed - Some hosting services don't allow files over a certain size and some don't allow you to have certain types of files on your Web site, this might includes pdf files. Make sure that what you are about to add to your Web site is allowed by your Web hosting service first. You don't want to get your Web site shut down for not following the rules or do a lot of work getting ready to add the pdf file to your Web site to find out you can't.

    If your hosting service does not allow you to have pdf files on your Web site you can get your own domain name for your Web site or switch to another hosting service that does allow pdf files or large files on Web sites.

  2. Upload pdf File To Your Web Site - Upload your pdf files to your Web site using the easy file upload program that your Web hosting service provides. If they don't provide one then you need to use an FTP program to upload your pdf file to your Web site.

  3. Find Your pdf File's Address (URL) - Where did you upload the pdf file to? Did you add the pdf file to the main folder on your Web site or to another folder? Or, did you create a new folder on your Web site just for pdf files? Find the address of the pdf file on your Web site so you can link to it.

  4. Choose a Location For Your pdf File - Which page on your Web site, and where on the page, do you want the link to your pdf file to be?

  5. Find The Location of the pdf File in Your HTML - Look through the code on your Web page until you find the spot where you want to add the link to your pdf file. You may want to add <p> before you enter the code, for the link to your pdf file, to add a space.

  6. 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:

      <a href="http://sunny.freeservers.com/flowers.pdf">Click here for the pdf file called flowers.</a>

    • 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:

      <a href ="http://sunny.freeservers.com/fun/flowers.pdf">Click here for the pdf file called flowers.</a>

  7. Testing The pdf File Link - IF you are creating your Web site on your computer, before downloading the the pdf file to your server, and you want to test the link to the pdf file to make sure it works right you will need to link to the pdf file on your hard drive like this:
    • The pdf file is located in the "My Documents" folder
    • It is called "flowers.pdf"
    • The text for the pdf file says "Click here for the pdf file called flowers."
    • Code is: <a href ="file:///C|/My Documents\flowers.pdf">Click here for the pdf file called flowers.</a>

©2014 About.com. All rights reserved.