在没有打开/保存对话框的情况下在Acrobat阅读器中打开PDF文件 [英] Open PDF file in acrobat reader without open/save dialog box

查看:76
本文介绍了在没有打开/保存对话框的情况下在Acrobat阅读器中打开PDF文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

点击按钮我已经编写了一个代码来打开pdf文件,该文件正常工作只有我想要的东西在acrobat阅读器中打开而不是要求打开/保存对话框。

我用过程.start()但它不适用于IIS。我不想在另一个浏览器中。







我可以禁用保存,复制,打印pdf文件。





On button click I had written a code to open pdf file which is working properly only the thing I want is open in acrobat reader instead of asking open/save dialog box .
I had used process.start() but it is not working on IIS . I don't want in another browser .

and

Can I disable save,copy,print of pdf file.


Response.ContentType = "application/pdf";
Response.AppendHeader("Content-Disposition", "attachment;filename=" + filepath);
Response.TransmitFile(filepath);
Response.End();

推荐答案

打开文件(pdf / office / image),没有打开或保存对话框 [ ^ ]



http://forums.asp.net/t/1675266.aspx [ ^ ]


确保在响应中添加以下标题:

Make sure you add the following headers in the reponse:
Content-type: application/pdf<br />
Content-Disposition: inline; filename="yourfile.pdf"





实际打开阅读器中的pdf仍然取决于客户端浏览器。取决于与pdf相关联的程序(如果有)并且用户没有禁用它。



祝你好运!



Actual opening the pdf in a reader is still up to the client browser. Depending on what program is associated with pdf (if any) and the user didn't disable it.

Good luck!


这篇关于在没有打开/保存对话框的情况下在Acrobat阅读器中打开PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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