I have an example of two websites that uses google drive and whenever they have a new document they just change unique id (drive uploaded document) in URL (after ?id=) and than the documentis display in on a canvas. It’s also SEO friendly and indexed by google. So what should be it’s raw code?
-
Demo – Click Here | I want this One {Check Code by Inspect Tool}
I just want to use google drive for storage and call document on my website’s pdf.js canvas for increase page view, user time, and display ads on PDF web pages like the demo that above.
3
Answers
Here are is the demo for PDF.JS showing PDF in the webpage
https://mozilla.github.io/pdf.js/getting_started/
Changed pdf URLs to see the result
Tested here:
https://codepen.io/max-makhrov/pen/JjpLxXP
Here’re failed URLs:
Here’s a surprise: you may use a range from existing Google Sheet if it has an Access. This URL works:
I added a demo to load pdf with lazy load. We need to implement drive api to fetch the pdf from drive or it will give cross-origin error.