How to Embed PDF Files and Office Documents in WordPress

  • How Tos

Embedding a PDF file into your WordPress posts can be a good way to display your content. Many websites use PDF files and office documents to share online forms, information booklets, and even textbooks. Viewers can then read, download, or print these files as needed. In a way, such files enable you to use a small amount of website space to deliver a large amount of content. 

WordPress comes with a dynamic content editor and allows you to smoothly insert videos, audio, tweets, and other media formats using the embed blocks. But it does not provide the facility to insert files like PDF, spreadsheet, and office documents in your blog posts. In case you want to include a PDF file, you can upload the file using the Add Media option, insert it, and the link to that file will be added to your page.

By doing this, your visitors can either download it or open the file in the web browser by leaving your website. But is there any way to embed PDF files in your posts and let your visitors view it without leaving your website? Of course YES. That is what this article is all about.

In this article, we will show you how to embed a PDF file and office documents to your posts quickly and easily using the best plugin available. 

Embed a PDF File using EAD Plugin

There are many plugins that are developed to add a PDF file to your post, each offering something slightly different. In fact, using a plugin to insert PDF files and other office documents is a method we would recommend to all WordPress beginners, as it is the quickest and most accessible option. Here, we will be using a top seller plugin called Embed Any Document (EAD) to describe the steps. 

Embed Any Document WordPress plugin enables you to upload and insert your documents easily in your post without the help of any additional browser plugins like Flash or Acrobat reader. The plugin uses Google Docs Viewer and Microsoft Office Onlineโ€™s services to display the documents on your website. Apart from PDF files, the plugin also supports Microsoft Word, Excel spreadsheet, PowerPoint presentation, text files and many more. So, letโ€™s get started with the steps.

Step 1: Install and Activate EAD Plugin

Sign in to your WordPress Dashboard and go to Plugins > Add New. Now search ‘Embed Any Document’ in the search box. Once you find the plugin, just install and activate it. The plugin has now been installed on your website.

If you want to learn more about how to install a WordPress plugin, check out our step-by-step guide too.

Step 2: Embedding the documents

You can either create a new post or open an existing one to embed a document. Once done, add the Document block under the Embeds section.

With a click on the ‘Add Document‘ button, it lets you upload documents directly into the media library and insert them.

The core plugin supports two methods for adding documents- direct upload, add from external URL whereas the ‘Plus’ version allows you to embed files from your Dropbox, Google Drive and Box.com accounts.

Step 3: Settings and Options

Once you choose the document to embed, you will see the options to customize the document. You need to review them and click the Insert button. Users can adjust the default size and download link options from this page. 

Examples

Embedded PDF File

[embeddoc url=”https://wp-content.co/wp-content/uploads/2020/07/pdf-sample.pdf”]

Embedded DOC File

[embeddoc url=”https://wp-content.co/wp-content/uploads/2020/07/word-sample.docx” viewer=”microsoft”]

Embedded PPT File

[embeddoc url=”https://wp-content.co/wp-content/uploads/2020/07/ppt-sample.pptx” viewer=”microsoft”]

Embed Any Document PLUS

If you want to add a file directly from Dropbox, Google Drive or Box.com, you have to buy the premium version of the plugin, Embed Any Document Plus.

Just configure the following settings and you can easily embed the files in Dropbox or Box.com into your WordPress website.

1.  Go to Settings > Embed Any Document Plus

2.  Add the API key or client ID for Dropbox, Drive or Box.com from the respective service providers and add them to the Embed Any Documents Cloud Settings page.

3.  Click Save Changes.

If you have any confusion regarding the cloud options, you can have a look at the pluginโ€™s detailed documentation.

As mentioned earlier, the EAD plugin lets you embed almost all kinds of file types. There are many other plugins that are dedicated to inserting only PDF files such as PDF Embedder, Embed PDF Viewer etc. The PDF Embedder Plugin has a unique method for embedding PDFs, using Javascript only, and not using any iframes or third-party services.

Wrapping Up

All the plugins mentioned in this article are good options when it comes to embedding a PDF file in WordPress. But, if you want to embed all kind of documents, EAD is definitely the best choice. So simply choose the one that best suits your needs and skill set. If you have any other plugin in mind and believe that it is better than the ones mentioned in this article, let us know in the comment section.

The WP Week Newsletter

A weekly newsletter covering updates from the WordPress ecosystem that are relevant and helpful for WordPress agencies, developers, and enthusiasts

Leave your comment

Your email address will not be published. Required fields are marked *