How To Embed PDF Files From Google Drive Into Your WordPress Site


How To Embed PDF Files From Google Drive Into Your WordPress Site

Embed PDF Files From Google Drive To WordPress

WordPress has a plethora of plugins, so you may simply discover many plugins for practically any demand or problem. The WordPress plugin compromised the website’s security; in other cases, popular plugins with millions of active downloads were also impacted. So, unless absolutely required, we should avoid installing or customizing more plugins in WordPress.

There are several free and paid plugins available for embedding PDFs in any WordPress page or post. These plugins are handy in a variety of ways, especially if you choose the premium version, which may meet your specific needs. However, if you want a quick remedy and a simpler way to embed a PDF without installing anything, consider embedding the PDF from Google Drive.

How to Embed PDF from Google Drive?

Embedding PDF from Google Drive is the simplest way to embed PDF to any WordPress website; it does not involve the installation of any other plugins and saves server storage space because files are supplied straight from Google Drive. The procedures are as follows:

  • Access your Google Drive account.
  • Upload the PDF to Google Drive.
  • Right-click the PDF and choose Share.
google drive
  • Navigate to the General Access section. Select “Anyone with the link” from the drop-down menu.
Embed PDF Files
  • Click the ‘Done’ button.
  • If you wish to limit downloads, prints, and so on, go to the Settings icon and uncheck the appropriate boxes.
Embed PDF Files 2
Embeding settings
  • To open the PDF file, right-click it in Google Drive and select “Preview.”
  • On the next screen, click the three dots in the upper right corner to reveal a menu, then choose “Open in a new window.”
Open in new window
  • Click the upper right-corner dots again in the new window to bring up a menu.
  • Choose ‘Embed item…’
Embed Item
  • The HTML embed code will be displayed in the next window; copy it.
Copy code
  • Go to the WordPress page or post where you wish to embed PDF file, select “Text” mode, and then Paste the Code.
Paste the code
  • If you want, you can change the iframe’s width and height; if you want to add multiple PDFs, use the same code and just replace the URL; make sure the file is accessible to anyone with the link.
  • Continue revising your post, and after you finished, click “Preview” to preview the post and “Publish” to publish it.

Using this method, it is easy to embed PDF files in WordPress.

Alexia Barlier
Faraz Frank

Hi! I am Faraz Frank. A freelance WordPress developer.