HTML PDF 查看器
除了使用 Acrobat Reader 之外,还有其他方法可以在网络上查看 PDF 文件吗?我需要控制查看器以编程方式触发文档的打印。
PDF 的来源应来自网络服务 URL / AspX
Is there any alternative way to view PDF files on the web instead of using Acrobat Reader? I need to control the viewer to programmatically trigger the printing of the document.
The source of the PDF should come from a webservice URL / AspX
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为最简单的方法是使用 Google 文档查看器:
您需要将 PDF 文件托管在某个在线位置,可能位于您的公共网站的文件中(它需要是公共网站),并将 PDF 文件的链接放在上面 iFrame 中的“PathToMyPdfFile.pdf”。然后设置你需要的宽度和高度。
Google 甚至在这里为您生成此代码:
然后只需将此 iframe 放置在页面正文中要显示 PDF 的任何位置即可。这也支持许多其他文件格式。
The easiest I would think is to use the Google Doc Viewer:
You need to host your PDF files somewhere online, may be in a file in your public website ( it needs to be a public site) and put the link to the PDF file in "PathToMyPdfFile.pdf" in the iFrame above. Then set the width and height you need.
Google even generates this code for you here:
Then simply put this iframe anywhere in the body of your page where you want to display your PDF. This also supports many other file formats too.
在线文档视图有很多选项,有些是开源的,有些是专有的。就我个人而言,我在 Flex Paper 方面获得了很好的体验。这将允许您在您的网站上包含文档视图,并且有一些开发人员资源可让您将其与您正在寻找的功能集成。
有关演示,请参见此处:http://flexpaper.devaldi.com/demo/
There are quite a few options for document views online, some open source others proprietary. Personally, I've had good experiences with Flex Paper. This will allow you to include the document view on your website, and there are some developer resources which will allow you to integrate it with the functionality you're looking for.
For demos, see here: http://flexpaper.devaldi.com/demo/
您可以使用 FoxIT PDF 查看器。它是免费且可编程的。
You can use FoxIT PDF viewer. It's free and programmable.