如何在mvc4 Applicaton中添加google doc查看器? [英] How to Add google doc viewer in mvc4 Applicaton?
问题描述
我是编程的初学者.我的问题是,我想在我的网站页面的Google Doc Viewer
中显示PDF
文件.我将PDF
文件放在名为Bullettin
的文件夹中,它在App_Data
文件夹中.
I am beginner in programming. My problem is, I want to show PDF
files in Google Doc Viewer
in my website page. I put my PDF
files in folder named as Bullettin
, it is in App_Data
folder.
如何使用C# MVC4
应用程序通过Google Doc Viewer
在我的网站中查看此PDF
文件?
How can I view this PDF
file in my website through Google Doc Viewer
using C# MVC4
application?
我在查看页面中使用了以下代码 http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true"target =" _ blank"class =" embed>查看
i used the following code in view page http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true" target="_blank" class="embed">View
推荐答案
您应使用以下网址进行嵌入:http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf
进行预览
You should use the following url for embed: http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf
for previews
和:<a href="http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true" target="_blank">Preview</a>
以获得链接,最后:
<iframe src="http://docs.google.com/viewer?url=http://localhost:3907/App_Data/Bullettin/JCI.pdf&embedded=true"></iframe>
对于iframe.
好吧,本地主机对您不起作用,因此将项目放在实时服务器上或使用IP地址链接服务器.
Well, localhost will not work for you, so get your project on a live server or use an IP address to link your server.
祝你好运.
这篇关于如何在mvc4 Applicaton中添加google doc查看器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!