在div中显示Pdf内容 [英] Display the Pdf content in div

查看:876
本文介绍了在div中显示Pdf内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用C#或asp.net.help我显示Div或面板中的pdf文件内容

解决方案

在指向Google文档查看器的div中嵌入iframe,并指定要显示的PDF文件。这是你应该添加的代码:



 <   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查询字符串参数就是这样!您不仅可以显示PDF,还可以显示查看器支持的任何其他文件,如doc,xls等。


Refer- 使用GhostScript在ASP.NET应用程序中显示PDF文件的内容 [ ^ ]。

i need to display the pdf file content in the Div or panel using C# or asp.net.help me out

解决方案

Embed an iframe inside a div 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>



Then you just need to set up your own document file to the "url" query string param and that's it! You can display not just PDF but any other file supported by the viewer like doc, xls, etc.


Refer- Displaying the contents of a PDF file in an ASP.NET application using GhostScript[^].


这篇关于在div中显示Pdf内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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