【问题标题】:Displaying a file created through Google Drive API with the Google Drive Viewer使用 Google Drive Viewer 显示通过 Google Drive API 创建的文件
【发布时间】:2013-11-20 21:17:13
【问题描述】:

我可以通过 google drive api 创建一个文档。

我找回了一些网址:

  • 备用链接:

https://docs.google.com/document/d/xxxsome_idxxxxx/edit?usp=drivesdk

  • 嵌入链接

https://docs.google.com/document/d/xxxsome_idxxxxx/preview

感谢google document viewer,我想显示创建的文档,就像在这里完成的那样:http://architects.dzone.com/articles/embedding-google-docs-and

问题是我无法使用上述 URL 在查看器中打开文档。

我还尝试直接从谷歌驱动器发布文档(菜单文件>发布到网络...)。网址类似于:

同样,文件无法在查看器中呈现。

有人知道如何做到这一点,即让查看器以 pdf 模式显示通过 api 在驱动器中创建的文档吗?

谢谢!

【问题讨论】:

    标签: javascript html google-drive-api


    【解决方案1】:

    您可以将文档转换为 pdf,然后将 pdf url 传递给 google 文档查看器。事实上,您不必为此付出任何努力。使用文件对象谷歌提供嵌入链接,其中之一将是 pdf。只需将此 pdf 链接传递给 google viewer。

    【讨论】:

    • 我也有同样的问题。我已经从驱动器中检索了文件,现在我想显示它。请帮我详细说明。说明如何在 Google Viewer 等中显示它。
    猜你喜欢
    • 1970-01-01
    • 2012-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-07-22
    • 2020-01-06
    相关资源
    最近更新 更多