How to Embed PDF from Google Drive
Here's a guide on how to display a PDF uploaded from Google Drive to a HTML page using iframe


  1. Make sure that your PDF is uploaded properly and all the priveleges are set up as well. Note that files' access in a Google Drive can be configured.

  2. Right-click on the file and select Preview


  3. Click the three dots on the upper right and select Open New Window


  4. This will open the file to a new tab/window. From here, again, click the three dots on the upper right side and select "Embed Item"
  5. Copy the iframe code and use it on your HTML code.


Note that you can adjust the width and height of the iframe depending on what you'll be needing.

Also, a warning might appear in case you forgot to set the accessibility of the said file.

No comments :

Post a Comment