How to Link to PDFs and Other Files in Joomla

One of the things that many people use their websites for is sharing documents. Many organizations produce a large number of documents and need to make them available on their site.

In this tutorial, we'll show you two ways to share PDF documents in Joomla.


Option #1. OSDownloads and Joomla PDFs

OSDownloads is the easiest way to add downloads to Joomla. OSDownloads gives you a flexible and reliable Joomla downloads directory that you can use to store PDFs. If you have a lot of PDFs and other files, OSDownloads is a good place to start.

If you'd like a full guide to OSDownloads, click this link.

OSDownloads supports PDFs, no matter where they're located. You can decide to upload the file or enter the URL if the file is on Amazon, Dropbox, Box or another service.

OSDownloads Joomla PDF downloads

OSDownloads allows you to add Joomla's custom fields to your downloads, so you can show lots more information about your files.

OSDownloads custom fields for PDF files

OSDownloads enables you to collect an email in exchange for downloads. But you can also use Joomla's custom fields to ask for more details such as name, phone, and interests during the download process.

It is possible to show your PDFs inside the main OSDownloads directory. However, you can also show downloads inside Joomla articles. If you're using OSDownloads Pro, you can use the following shortcode in your articles to display the download button:

{osdownloads download_button id-of-the-file "Custom text"}

Here are the three different parts to this shortcode:

  • osdownloads download_button ... this part never changes.
  • id-of-the-file ... this is the ID number for the file.
  • "Custom text" ... this is what visitors will click on.

You can find the ID number for the file, by visiting Components > OSDownloads Pro. In this case, the ID number is 1.

id number for a Joomla PDF file

Here's an example of OSDownloads Pro download buttons that we created for our customers at Joomlashack.com:

Here's an example of an OSDownloads Pro download button in action

Here's how an OSDownloads Pro download button shortcode would appear in a Joomla article:

article code for a Joomla PDF file

When you publish the code, the link will appear as in the image below.

PDF link in article


Option #2. Joomla Content Editor

We're going to use Joomla Content Editor (JCE), which we highly recommend for all Joomla sites, even if you don't want to use it for PDFs. So, if you haven't done so, take these two steps:

  1. Download and install JCE.
  2. Upload a document to your site.

Now, let's begin.

  • Inside your text editor, select the text that you want to link to a document:

select the text for a Joomla pdf file link

  • Click the link icon in the toolbar:

How to Link to PDFs and Other Files in Joomla

  • Click the small "Browse" icon in the top-right corner of the pop-up:

Browse for a Joomla PDF file

  • Browse through the Media Manager to find your file.
  • Select the file and click the "Insert" button:

Insert a Joomla PDF file

  • You'll see that both the URL and Text fields are filled in. Make sure that both of these are correct.
  • Click the "Insert" button:

Add a Joomla PDF file to an article

  • You should now see that you have an active link in your text:

A joomla PDF download link in an article