我想在asp.net页面中显示pdf文件。 [英] I want to display pdf file in asp.net page.

查看:100
本文介绍了我想在asp.net页面中显示pdf文件。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在一个面板中的asp.net页面中显示pdf文件。



我希望显示我的页面结构,如下所示。



输入PDfName - > TextBox



pdf show



按钮确定。和按钮取消。

I want to Display pdf file in asp.net page in one panel.

and i want to show my page structure like below.

Enter PDfName--> TextBox

pdf show

button OK. and Button Cancel.

推荐答案

如果要在某些Web控件之间的WebPage中显示PDF,请参阅



将PDF嵌入到网页中自定义控件 [ ^ ]
If you want to Display the PDF in WebPage between some Web Controls , then refer

Embed PDFs into a Web Page with a Custom Control[^]


参考 - Asp.net使用C#,VB.NET在Web浏览器中打开PDF文件 [ ^ ]。


试用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)到url查询字符串参数,就是这样!



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


这篇关于我想在asp.net页面中显示pdf文件。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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