I’m trying to post some PDFs on my blog, but I’d like for them to be viewable without the need to download them.
My plan was to upload to GoogleDrive/Dropbox, set them to shareable with link, and then use HTML code to embed them, but I’ve tried this already and it’s not working.
Is there another way?
The only instance I’ve seen recently is a blog using Scribd and then pasting the html code into a post. It is a paid service however. I’m using the /file option for pdf’s under 5MB and leaving a download link for larger files.
I was able to get it working with uploading to GoogleDrive, then have a custom theme for any pages where I’m embedding the PDF. I just paste the link to PDF into the post (making sure it’s the link ending in /view). The script will replace the link with an iframe embedding the post and then add a link to download the file below it
The template is just the same as the normal post template, but with this script added to it. You might even be able to add this directly to the code injection, but I’m not sure.
I intend to do something similar with the new file upload cards and use google’s doc viewer to remove the need to upload to google.
<iframe src="https://docs.google.com/viewer?url={{URL OF THE PDF UPLOADED TO GHOST}}&embedded=true" style="width:100%; height:500px;" frameborder="0"></iframe>
Still don’t understand why we can’t embed pdfs like this into ghost with the embed function. I’m not a coder, but this is extremely frustrating. Embedding documents should not be so challenging. Has anyone developed a workaround that does not involved editing a theme?