WE CAN ADD A PDF TO BLOGGER FROM GOOGLE DRIVE


We can add a PDF to Blogger by hosting it on another platform, such as Google Drive, and then embedding it into your blog post
using an iframe.


After uploading your PDF to Google Drive and sharing it with "anyone with the link" set to view, you'll copy that link and modify it to an embedding link, then insert it within an <iframe> tag in the HTML view of your Blogger post. 

Steps to Embed a PDF:
  1. Upload the PDF to Google Drive: Go to Google Drive, click the "New" button, and then select "File upload" to upload your PDF. 
  2. Get a Shareable Link: Open the uploaded PDF in Google Drive, right-click on the file, and select "Share". 
  3. Change Sharing Settings: In the sharing settings, change the access from "Restricted" to "Anyone with the link" and ensure the role is set to "Viewer". 
  4. Copy the Link: Click "Copy link" to copy the shareable URL to your clipboard. 
  5. Prepare the Embedding URL: Go to your Blogger post and switch to the HTML view. 
  6. Paste the iframe code: Insert the following iframe code into the HTML view, replacing the https://drive.google.com/file/d/FILE_ID/ with your copied link: 
Code
    <iframe height="600px" src="https://drive.google.com/file/d/FILE_ID/preview" style="border: 0;" width="100%"></iframe>
  • Note: To find the FILE_ID, you can extract it from the link you copied. The preview at the end of the URL allows the PDF to be viewed directly in the iframe. 
  1. Publish your post: Save and publish your post to display the PDF on your blog. 

Comments