In this article I'm going to show you how to add a PDF (Portable Document Format) file to your website.

Linking to a PDF file

Most novice website users are aware that you can link off to another website or webpage from your own website. However they can become confused when they try to figure out linking to a PDF document that they might need to share.

It's actually a very simple process to link to a PDF file, if you've linked to another webpage before than you should have no issues at all figuring it out, as it's essentially the same process.

If you are simply trying to directly type out a HTML link to a PDF document, you would use the following format, in this example our sales.pdf document is in the same directory as the HTML page we are linking to it from:

<a href="/support/sales.pdf">Sales figures</a>

This would create a link saying Sales figures, and when visitors click on the link, it should either open up their PDF reader automatically, or prompt the visitor to download the PDF file.

Alternative PDF linking methods

In some cases, you might not be directly modifying HTML code, and in these cases you would typically need to link to a PDF file differently. For instance if you're using the Premium Website builder you would want to read about uploading and linking files in the Premium Website Builder.

In some cases you might also want to be able to display information from a PDF document without your visitor having to have a PDF reader installed, you could use something like Google Docs in order to accomplish this. We have a guide on how to embed a PDF in a Joomla 2.5 article that explains this process in-depth.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Like this Article?

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question
n/a Points
2014-04-09 8:17 am

I have a PDF which I link to on my website.  

When users click on a link the PDF opens on screen, how do I get it so that it either downloads or prompts the user to download instead?

Staff
8,172 Points
2014-04-09 8:49 am
The PDF opening on screen is due to the user's browser. Most modern browsers will now open PDF files on screen now instead of prompting to download the file. To download the file, the users would need to right-click the file and click Save.
n/a Points
2014-07-19 6:45 pm
I still do not see how to add a pdf to my website. These instruction are for linking.
Staff
9,965 Points
2014-07-21 12:19 pm
Hello Lyle,

Linking to a PDF is the same as adding it your website. For instance when you'd like to place an image on your website you simply create a link to it with the <img> HTML tag.

There is no HTML tag for directly embedding a PDF file into your website, but most web-browsers these days can simply read a PDF file directly in them. So simply using a link on your website to where you have that PDF file stored on your server should allow the visitor of your website to view that document.

If you really wanted to display a PDF document embedded into your website, you could try to use something like the PDF.js library which uses JavaScript to display the document in place on your website. But that is going to be a much more complex setup than simply going the normal route of creating a link to the PDF.

Please let us know if you had any further questions at all!

- Jacob
n/a Points
2014-07-21 12:52 pm

What server? The PDF is is on my computer.

Staff
9,965 Points
2014-07-21 2:53 pm
Hello Lyle,

Just like if you would want to display an image on your website, you first need to upload the image or in this case the PDF file to the same server that your website is hosted on.

You can do this either with FTP using a client such as FileZilla, or if your webhost is using cPanel you can upload a file using File Manager.

If you're using a Content Management System like WordPress to manage your site, then you would follow these steps instead:


  1. Login to WordPress

  2. Click on Posts from the left-hand menu

  3. Hover over the page you want to link to your PDF from, then click on Edit

  4. Place the mouse cursor where you'd like to add the PDF link and then click on Add Media

  5. Next click on the Upload Files tab

  6. Now click on Select Files

  7. Browse to the location on your computer with your PDF file, select it and click Open

  8. With the PDF document selected and showing a check mark now, click on Insert into page



If you're using WordPress, you should see that it simply creates an <a href> link as originally explained in this guide that you're commenting on.

Please let us know if you have any further questions. If you had any specific issues with our instructions please be as specific as possible for exactly what you're trying to do and we'd be glad to try to point you in the right direction.

- Jacob

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

6 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!