超链接可以在ASP.NET中打印PDF文件 [英] Hyperlink can print PDF file in ASP.NET

查看:88
本文介绍了超链接可以在ASP.NET中打印PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在服务器上的文件夹中有一个pdf文件。我希望用户能够打印pdf文件而不是下载它。我有一个超链接到位。我希望用户点击超链接和pdf打印。我怎样才能使这个工作?

I have a pdf file in a folder on the server. I want the user to be able to print the pdf file not download it. I have a hyperlink in place. I want the user to click on the hyperlink and the pdf prints. How can I get this to work?

推荐答案

我可以想到几个选项:



- 您将PDF导出/转换为几个图像文件,然后将它们放入隐藏的iframe并使用window.print()打印iframe内容



- 或者您将PDF显示在iframe中,该iframe指向Google Doc Viewer,它将PDF作为图像文件免费呈现。 不使用Acrobat的PDF查看器 [ ^ ]

注意您的PDF需要公开访问,因为您需要将其传递给Google以执行其工作



- 最后一个选项不是免费的,不确定它是否值得您的案例 http://goo.gl/OLPha [ ^ ]
I can think of a couple of options:

- You export/convert the PDF to a couple of image files, then you place them into a hidden iframe and use window.print() to print the iframe content

- Or you display the PDF into an iframe which points to Google Doc Viewer which will render your PDF as image files for free. PDF viewer without using Acrobat[^]
Note that your PDF needs to have public access as you need to pass it to Google for doing its job

- The last option is not free and not sure if it's worth in your case http://goo.gl/OLPha[^]


这篇关于超链接可以在ASP.NET中打印PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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