While some social networks and plugins have made it easy to display dynamic content like videos, powerpoint presentations, and music, there aren’t too many that allow embedding PDF files.
PDF files are an Abode file extension for documents containing images, text, and other dynamic content. PDFs are often used as a file format for ebooks.
Normally a lot of people just insert a link to the file or a button to download the PDF. In this tutorial, I will show you a couple methods of uploading and displaying a PDF in WordPress.
Upload and Display a PDF in WordPress Without a Plugin
The first method is a simple link to your PDF. When editing a post or page.
1. Click on the Add Media button.
2. Click to upload your file, or if you already have uploaded the file, select the image from your Media Library.
3. Fill out the information of your file.
4. Click the button to insert the file.
Example of the code for this method:
<a href="LINKTOYOURPDF">Your PDF's File Name</a>
If you want the PDF to view in a new window:
<a href="LINKTOYOURPDF" target="_blank">Your PDF file's Name</a>
The second method is using an image to represent your file.
1. Click on the Add Media button.
2. Click to upload your file, or if you already have uploaded the file, select the image from your Media Library.
3. Copy the link (or URL) to the file.
4. Go back and upload the image you want to represent your PDF file.
5. Click the drop own box to Link To and select Custom URL.
6. Place the URL to the PDF file in the field below that drop down.
7. Click the button to insert the file.
Example of the code for this method:
<a href="LINKTOPDF"><img src="LINKTOIMAGE" alt="IMAGENAME" class="alignnone" /></a>
If you want the PDF to view in a new window:
<a href="LINKTOPDF" target="_blank"><img src="LINKTOIMAGE" alt="IMAGENAME" class="alignnone" /></a>
Upload and Display a PDF in WordPress With a Plugin
To upload and display a PDF in WordPress with a plugin, you will need the Google Doc Embedder. This plugin alows you to use a shortcode to embed your PDF within a post or page.
You will need to configure this plugin before using, but the default settings are usually good to start with. Once you have installed the Google Doc Embedder, you can go to your post or page and add the following shortcode:
[gview file="http://url.to/file.pdf"]
Replace the link within the shortcode with the actual file. As side note, the plugin has a little button for your convenience in the TinyMCE bar… so you can click that and insert the link to your PDF.
The following is an example of how the Google Doc Embedder plugin works.
Samantha Vermillion says
Hi Nile,
Thanks for sharing this tutorial. I always wanted to know this, but i had to embed an external flash based app to display PDF Files.
Pramod says
Hi Nile !
This is an unique post ! I never imagined/thought that a pdf file can be displayed on WordPress websites . Thanks for sharing this tutorial with us . I would try it out for sure .
-Pramod
hiren says
Hi Nile
nice article and tutorial how to upload pdf file without plugin. very helpful with me. thanks for sharing.
siddharth says
Hey Nile
This is great post and I never thought that a pdf file can be displayed on WP. Thanks for giving such a informative post to share with us .
rajat says
hello nile
really enjoyed the read This is an unique post ! I never imagined/thought that a pdf file can be displayed on WordPress websites . Thanks for sharing this tutorial with us . I would try it out for sure .thnx for sharing this
Silviu says
Hi Nile,
The more I come to your site, the more interesting it is. I knew how to insert a slideshare on my blog but a pdf… ? This idea is absolutely new to me. However, it is very attractive. PDFs are easy to create and now I know how to insert them in my posts. Great!
What’s even better is the fact that I can insert the pdfs without using a plugin. Music to my ears. I always try to find ways to do everything without a plugin.
I will test the method and I am sure it works. Thank you.
Have a wonderful day
Honey Soni says
Hello Nile,
Wow Awesome tutorial. I never knew that we can display .pdf files in word press without any plugin. All explanation with pictures are mind-blowing.
Thanks for sharing the valuable tutorial π
Hamza Sheikh says
Well, this is something new for me. Because, I have never uploaded a PDF and viewed it in my posts. Thanks for sharing the appropriate method to achieve this work.
James Parker says
It cost me so much to reach your blog but once I came, all of my efforts turned into satisfaction due to clearly defined answer of all question that were in my mind regarding uploading and displaying pdf in wordpress. Thanks a lot for guidance.
-J
Election history of Pakistan
KULDEEP says
Hi Nile,
thank you for such a useful information. to tell its readers its articles in a pdf format is a easy way.
And hence one should try to upload the pdf of its best articles.
So that its customers may be satisfied.
Jhon says
Hurrah! At last I got a blog from where I be capable of genuinely take valuable information regarding my study and knowledge.
Andrew says
Hey Nile, thanks for this post. i am having a bulk of exam papers in PDF format which i would like to add to my exam niche blog. And this post of yours will surely help me out. thanks a ton.
gaurav says
Hi Nile,thank you for explaining this option in WordPress more….thanks for always sharing such useful tips π
gaurav says
Hi Nile,thank you for explaining this option in WordPress moreβ¦.thanks for always sharing such useful tips π
Anonymous says
Hello Nile,
Wow Awesome tutorial. I never knew that we can display .pdf files in word press without any plugin. All explanation with pictures are mind-blowing.
Thanks for sharing the valuable tutorial π
Yorinda says
Hi Nile,
thank you for sharing the different options on how to show a PDF on a blog post.
With the Google Doc plugin I assume the PDF will be loaded/linked from the Google Docs?
Which method do you prefer?
I appreciate learning new things from coming to your blog!
Cheers,
Yorinda
Chery Schmidt says
Good Morning Nile! I have been trying to figure this out for sometime now, I knew there was a way but just couldn’t find it anywhere. You have done an awesome job of explaining how to display a PDF! Woo Hoo Your Awesome Girl!! Thanks Chery π
Gautam says
Great tutorial and am surely gonna try this out.Hope it work for me too.
Lisander says
Cool tip, didn’t know this was even possible.
matt says
Your blog is awesome. Thank you so much for giving plenty of useful content.
Priti Sharma says
Hello Nile !!
I went through this article .. its very helpful about how to upload and display PDf in wordpress.