如何在mvc4 Applicaton中添加google doc查看器? [英] How to Add google doc viewer in mvc4 Applicaton?

查看:79
本文介绍了如何在mvc4 Applicaton中添加google doc查看器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是编程的初学者.我的问题是,我想在我的网站页面的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆