我需要查看嵌入了google drive链接的pdf文件,并在iframe中查看链接。
我尝试过以下代码:
<iframe src="https://drive.google.com/viewerng/viewer?url=https://library.osu.edu/assets/Documents/SEL/QuickConvertWordPDF.pdf" width="400px" height="300px" />
提前谢谢..
答案 0 :(得分:20)
试试这个..
<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" />
答案 1 :(得分:0)
你可以这样使用
<iframe src="https://docs.google.com/file/d/(your file id)/preview"></iframe>
答案 2 :(得分:-2)
这有效:
<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>