How to embed a PDF in a Joomla 2.5 Article

Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here.

Due to their popularity, PDF documents are everywhere these days. For example, many people buy PDF books online or send / receive PDF files via email at work. While emailing PDF documents is very common, you can also embed PDF files in a web page. Embedding PDF files in a web page makes it easier to share the file, instead of emailing the file you can simply send a link to the page that has the file.

There’s no built in PDF viewer for Joomla 2.5. You can however use Google Docs to help embed a PDF file into a Joomla 2.5 article. In this tutorial, we’ll show you how to add PDF files in Joomla 2.5.

To add a PDF to a Joomla 2.5 article:

  1. Log into your Google Docs accountIf you don’t already have a Google Docs account, we highly suggest that you look into it. There are many useful features available, and we actually use it every day! Please see https://docs.google.com for more information.
  2. Upload your PDF FileWithin Google Docs, click the Upload button (which is to the right of the CREATE button) and then click Files… Find the PDF file on your computer and then follow the rest of the steps to upload the file.
  3. Click Embed this PDF file…After you have uploaded your PDF, open it. In the top menu, click File and then click Embed this PDF file. You will then be given code similar to the following:

    <iframe src=”https://docs.google.com/file/d/abcdefghijklmnopqrstuvwxyz/preview” width=”640″ height=”480″></iframe>

  4. Insert the embed code into your Joomla 2.5 articleNow that you have the necessary code, open the Joomla 2.5 article you want to embed the pdf in. Using the code editor, insert the html code. When finished, save your changes and visit your update Joomla 2.5 article! You can see in the screenshot below how the embedded PDF file looks in our testing:

    embedded-pdf-in-article

15 thoughts on “How to embed a PDF in a Joomla 2.5 Article

  1. Hey,
    Very informative article. I am trying to add preview pdf feature in my wordpress site. Please refer article on this.

    1. Hello and thanks for contacting us. The easiest option may be to create a cropped JPEG or PNG version of the PDF that links to the actual PDF. This way, you don’t have to deal with cropping a full image or PDF with CSS.

  2. HELLO,
    I HAD A DOUBT CAN I UPLOAD A PDF OF THE ARTICLES THAT I WRITE ? ITS RELATED TO TAX FINANCE AND OTHER LEGAL WORK.
    IS IT OKAY TO UPLOAD A PDF RELATED T THAT TOPIC?

    1. If you’re uploading a PDF to a website then there should be no issue as long as the content is legitimate. Joomla does provide a way for you to upload documents and then include them in your article. Check out this article for the steps for uploading the file: https://www.inmotionhosting.com/support/edu/drupal-7/media-manager/upload-using-media-manager.

  3. Valuable post , For my two cents , if your business have been needing to merge PDF or PNG files , my family merged a service here <a href=”https://www.altomerge.com/” >altomerge.com</a>.

Was this article helpful? Join the conversation!

Server Madness Sale
Score Big with Savings up to 99% Off

X