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

Steps:

  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.
    pdf-google-drive-access

  2. Right-click on the file and select Preview

    pdf-google-drive-access-previe


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

    pdf-google-drive-access-preview-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.

pdf-google-drive-access-preview-open-new-window-warning

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