使用ASP.Net的PDF文件的Native Viewer [英] Native Viewer for PDF files using ASP.Net

查看:82
本文介绍了使用ASP.Net的PDF文件的Native Viewer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我想在网络浏览器中显示PDF文件。但这需要在客户端计算机上安装PDF阅读器。有没有办法在Web浏览器中显示PDF文件而不在客户端计算机上安装PDF阅读器,哪个将使用自己的本机阅读器来显示内容?有没有可以帮我在网页浏览器中显示PDF文件的控件?



请帮忙。



谢谢,

Hi everyone,
I want to display PDF files in web browser. But this requires PDF reader installed on client machine. Is there any way to display PDF file in web browser without PDF reader installed on client machine and which will use its own native reader to display the contents? Is there any Control which can help me in displaying PDF file in web browser?

Kindly help.

Thanks,

推荐答案

试用Google Doc Viewer。只需在页面中嵌入iframe,指向Google文档查看器并指定要显示的PDF文件即可。这是你应该添加的代码:



Try Google Doc Viewer. Just embed an iframe in your page pointing to Google Doc Viewer and specifying the PDF file you want to display. This is the code you should add:

<iframe src="http://docs.google.com/gview?url=http://infolab.stanford.edu/pub/papers/google.pdf&embedded=true" style="width:600px; height:500px;" frameborder="0"></iframe>





那么你只需要将自己的文档文件设置为url查询字符串参数就是这样!



Then you just need to set up your own document file to the "url" query string param and that's it!


这篇关于使用ASP.Net的PDF文件的Native Viewer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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