Wednesday, May 21, 2014

Embedding Google Doc without left hand thumbnail/preview page view

I use Google Doc viewer with a number of clients and now Google seems to be limiting bandwidth with files that are hotlinked from other sites. So now I have had to host those files on Google Drive. However, embedding files from GDrive includes a the page preview pane.

Here's how to turn the Google Doc Viewer page preview pane off.















Here's a sample URL of a file hosted on Google Drive, named metadata.pdf (see above image)

https://docs.google.com/file/d/1E6msDpCEqwxlqbk4E96m-X3Lniw-YdFTF4hpLHdgAN8pgXHn_qZecYvCa51w/edit


For the sack of this article; The Google File ID is 
[Google File ID] = 1E6msDpCEqwxlqbk4E96m-X3Lniw-YdFTF4hpLHdgAN8pgXHn_qZecYvCa51w

from this standard Google Drive URL 


https://docs.google.com/file/d/[Google File ID]/edit

Cut and paste into this Google Document Viewer URL 

https://docs.google.com/viewer?srcid=[Google File ID]&pid=explorer&efh=false&a=v&chrome=false&embedded=true

then place the 
Google Document Viewer Embed <iframe>:

<iframe src="https://docs.google.com/viewer?srcid=[Google File ID]

&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="640px" height="480px"></iframe>


See example on my Solutions Tab

3 comments:

  1. srcid is not working anymore with the new drive update.
    do you have any offer?

    ReplyDelete
    Replies
    1. I have migrated to OneDrive now, use this
      http://metadataconsulting.blogspot.ca/2014/11/onedrive-document-viewer-for-pdfs.html

      Delete