Google 文档查看器 url 参数

发布于 2024-10-16 04:24:00 字数 148 浏览 10 评论 0原文

是否有任何类型的文档说明您可以在 Google 查看器的网址中放入哪些参数?

最初,我以为这只是 url、embedded、chrome,但我最近遇到了其他有趣的内容,例如 a、pagenumber,以及其他一些用于身份验证的内容等。

有任何线索吗?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

行雁书 2024-10-23 04:24:00

我知道的一个是“chrome”

如果你有 https: //docs.google.com/viewer?........;chrome=true

然后你会看到该文档的相当重的 UI 版本,但是使用“chrome=false”你会得到一个紧凑的版本。

但事实上,我自己想要一份完整的清单!

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!

千纸鹤带着心事 2024-10-23 04:24:00

我也在探索查看器的一些参数。
不过,“chrome”参数似乎没有做任何事情。这是
应该与embedded=true相同吗?

我知道的参数:

url=(显然)
嵌入=(显然)
hl= 设置 UI 语言(工具提示)
#:0.page.1 = 跳转到第 2 页(第 1 页编号为 0) - 这是不可靠的,通常需要在第一次加载后刷新,
违背了目的。

也就是说,当我在网站上使用 Google 文档查看器时,“将页面调整为
screen”是没有任何参数的默认视图。所以也许我是
误解了你的问题。

来源:为方便起见,这是唯一的完整引用答案(来自用户 k3david)到 @Doc 已于 2011 年将这个问题的 crosspost 发布到 Google 支持论坛。

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.

听闻余生 2024-10-23 04:24:00

我知道这个问题很老了,也许你已经解决了你的问题,但对于互联网上可能正在寻找答案的任何人来说......

我最近一直在寻找这个问题,遵循我在 GitHub Gist

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

更具体地说,嵌入特定页面的选项 我能找到的

<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>

最好的就是这篇文章(我想已经很长时间了)

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


但是,我尝试修改属性,结果只是重定向到

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

截至 2020 年 5 月,此解决方案可能不起作用

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

心如荒岛 2024-10-23 04:24:00

您可以传递 q=whatever 将搜索查询传递给查看器。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文