22

Is there any sort of documentation on exactly what parameters you can put in the url of Google viewer?

Originally, I thought it was just url,embedded,chrome, but I've recently come accross other funny ones like a,pagenumber, and a few others for authentication etc.

Any clues?

Kara
  • 6,115
  • 16
  • 50
  • 57
P O'Conbhui
  • 1,203
  • 1
  • 9
  • 16

4 Answers4

3

I'm also on a quest to discover some of the parameters of the viewer. the "chrome" parameter doesn't seem to do anything, though. Is this supposed to be the same as embedded=true?

Parameters I know of:

url= (obviously)
embedded= (obviously)
hl= set language of UI (tooltips)
#:0.page.1 = jump to page 2 (page 1 is numbered 0) - this is unreliable and often requires a refresh after the first load, defeating the purpose.

That said, when I use the Google Docs viewer on my site, "fit page to screen" is the default view without any parameters. So maybe I'm misunderstanding your question.

Source: For convenience, this is a full quote of the sole answer (it is from user k3david) to the crosspost of this question @Doc has posted to the Google support forum in 2011.

Aaron Thoma
  • 3,820
  • 1
  • 37
  • 34
3

One I know is "chrome"

If you've got https://docs.google.com/viewer?........;chrome=true

then you see a fairly heavy UI version of that doc, however with "chrome=false" you get a compact version.

But indeed, I'd like a complete list myself!

James T Snell
  • 1,588
  • 1
  • 15
  • 28
  • 1
    I opened a forum question with Google over my momentary motivation for this, maybe go there and make your own, or help bump mine up: http://www.google.com/support/forum/p/Google+Docs/thread?tid=5a53860eaa63a0b7&hl=en – James T Snell May 05 '11 at 18:31
3

I know this question is very old and perhaps you already solved your issue, but for anyone on the internet who might be looking for an answer...

I have been looking for this recently, following a guide I found on GitHub Gist

https://gist.github.com/tzmartin/1cf85dc3d975f94cfddc04bc0dd399be

More specifically, the option to embed a certain page of pdf using

<iframe src="https://docs.google.com/viewer?srcid=[put your file id here]&pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="580px" height="480px"></iframe>

The best I could fing was this article (I suppose from a long time now)

https://weekly-geekly.github.io/articles/111647/index.html


HOWEVER, I tried modifying the attributes and the result was simply a redirect to

  • https://drive.google.com/file/d/[ID]/edit
  • https://drive.google.com/file/d/[ID]/preview or
  • https://drive.google.com/file/d/[ID]/view

AS OF MAY 2020, THIS SOLUTION PROBABLY DOESN'T WORK

edvilme
  • 570
  • 7
  • 16
  • weekly-geekly ain't online anymore but repo's still available: https://github.com/BlancLoup/weekly-geekly.github.io/blob/master/articles/111647/index.html – brasofilo Mar 15 '21 at 18:00
1

You can pass q=whatever to pass a search query to the viewer.

Tim
  • 833
  • 11
  • 11