How to Embed a PDF File in WordPress in 2021?

Sometimes we have to embed the documents in our WordPress posts and pages. But the real problem here is even after uploading the PDF file to our WordPress website we can’t embed the file into the post or page.

We can only show the link of the PDF file in our content. If our visitor has to see or read the PDF file he or she has to download it first or else open the file link in a new tab of the web browser.

This thing seems to be a problem sometimes. But don’t worry today I will tell you how you can embed a PDF file in WordPress easily.

If the file which you want to embed is a form then I have a better plan for you. And that is creating the same kind of form in Google forms and then embed the Google Form in your content.

With the help of a simple plugin, I will tell you the procedure which you need to follow to embed a PDF file in WordPress post and pages.

Steps to Embed a PDF File in WordPress Posts and Pages

Ok, so now let us get started with this guide and learn how we can properly and easily embed a PDF file in WordPress content.

The first thing we have to do is add a PDF viewer in WordPress, that is to install the plugin on your website. Follow this link to visit the plugin page of PDF Viewer. (Plugin to be installed)

Get this plugin installed and activated on your website, you can directly install it using the dashboard plugin search or else download it from the WordPress plugin respiratory and then upload it to your website.

Do it however you wish and want. 🙂

Once you successfully install and activate this plugin on your website go to Dashboard → Settings → PDF Viewer.

You will be taken to the plugin settings page where you can change the height and the width of the PDF viewer. By default, the width is 600 px and height is 849 px.

If you want you can change the height and width by changing the values. In case you change the values make sure you click on Save Changes button which you can find at the bottom part of the settings page.

Now you are all set to embed the PDF file in your post and pages. You have to use the below mentioned short code wherever you want to show up the file.

[pdfviewer width="600px" height="849px" beta="true/false"]http://url.pdf[/pdfviewer]

You have to change http://url.pdf with the URL of the PDF file which you would like to embed in the post and pages of your website.

We know the short code which we have to use to embed a PDF file in WordPress. So the next thing we have to do is upload the PDF file to your website.

You can upload it by clicking on the Add Media button which we get in the post editor. Or by going to Media → Add New.

After uploading the PDF file you have to copy the URL of the file you can copy the URL of the file by clicking on it.

Now add this file URL in the short code mentioned above and paste that short code in post or page where you want to embed the PDF file.

Let’s Wrap Up

So this is how you can embed a PDF file in WordPress posts and pages. If you have any doubt in your mind you can leave your comment below.


  1. Howdy superb website! Does running a blog such as this take a great deal
    of work? I’ve absolutely no expertise in coding however I
    had been hoping to start my own blog in the near future.
    Anyway, if you have any recommendations or tips for new blog owners please share.

    I know this is off subject nevertheless I simply had to ask.
    Many thanks!

Leave a Reply

Your email address will not be published.