

You can change the width and height to fit your own page design.Ī PDF embedder demo created with the above code is at the end of this tutorial. Make sure to change the URL of the iframe src attribute to your own PDF URL link. You can add the following HTML code to your WordPress page or post to embed the PDF file. Step 3 - Embed the PDF to a WordPress page or post using an iframe You will need to change it to the following URL, that's, change the view?usp=sharing at the end of the URL to preview: The share URL copied from Google Drive will have the following format: Step 2 - Change the format of the Google Drive link If your PDF file will be viewed by any visitors of your website, in the Share dialog, change the General Access to "Anyone with the link" then click the Copy link button. In your Google Drive account, right click the PDF file, in the context menu, click Share. Step 1 - Share on Google Drive and copy the link Optional - Open the PDF file in a WordPress lightboxĪ PDF lightbox demo is as follows: Open Google Drive PDF File in a LightboxĪ PDF embedder demo is at the end of this tutorial.Step 3 - Embed the PDF to a WordPress page or post using an iframe.Step 2 - Change the format of the Google Drive link.Step 1 - Share on Google Drive and copy the link.

#GOOGLE DRIVE PDF VIEWER HOW TO#
We will also show you how to open the PDF file in a WordPress lightbox using the plugin Wonder Lightbox. This tutorial will guide you how to embed a PDF file hosted on Google Drive in a WordPress page or post.
