Google doc

From Moscow American - Travis Lee Bailey, Esq.
Jump to: navigation, search
Download books (for free)

Archive.org * App - Call Recorder * Calendar * Chrome * Epson Printer and scanner

Facebook * Google Docs * Galaxy * Instagram * Mediawiki * Microsoft

Namecheap * Photoshop * PDF * Programs/delete * Programs * Video * Video record screen * Windows

WhatsApp * Wordpress * Youtube (includes editing videos) - AUDIO FILES

Merge stick photos online

e

How to open specific page on Google's docs viewer https://stackoverflow.com/questions/9193144/how-to-open-specific-page-on-googles-docs-viewer


I found a solution I'll post here just in case somebody is in the same situation.

Every page inside google's docs viewer iframe has an id like :0.page.X, being X the number of the page. Calling the service like this

<iframe id="iframe1" src="http://docs.google.com/gview?url=http://yourpdf&embedded=true#:0.page.20"> won't work (maybe because the pages ids are not yet created when the page is rendered?)

So you just have to add an onload attribute to the iframe:

<iframe id="iframe1" src="http://docs.google.com/gview?url=http://yourpdf&embedded=true" onload="javascript:this.contentWindow.location.hash=':0.page.20';"> and voilà, the iframe will automatically scroll down after loading.

Note that page indices are zero-based. If you want to view the 20th page of a document in the viewer, you would need use the parameter