Html 如何在 iframe 中查看 Google Drive pdf 链接
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27685943/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-29 03:15:53 来源:igfitidea点击:
How to view Google drive pdf link in iframe
提问by user2725587
I need to view pdf file embed with google drive link and view link in iframe.
我需要查看嵌入谷歌驱动器链接的 pdf 文件并查看 iframe 中的链接。
I have tried following code:
我试过以下代码:
<iframe src="https://drive.google.com/viewerng/viewer?url=https://library.osu.edu/assets/Documents/SEL/QuickConvertWordPDF.pdf" width="400px" height="300px" />
Advance thanks..
提前谢谢..
回答by Deenadhayalan Manoharan
Try this..
尝试这个..
<iframe src="https://drive.google.com/viewerng/viewer?
url=https://library.osu.edu/assets/Documents/SEL/QuickConvertWordPDF.pdf?
pid=explorer&efh=false&a=v&chrome=false&embedded=true" width="400px" height="300px" />
回答by MindSpaceApocalypse
This works:
这有效:
<iframe src="https://drive.google.com/file/d/(your file id)/preview?usp=embed_googleplus" style="border: 0; top: 0; left: 0; width: 640; height: 700; position: absolute;" allowfullscreen></iframe>