我希望pdf文件在pdf阅读器中打开,而不是在asp.net应用程序中的pdf书写器中打开 [英] I want pdf file to be opened defalutly in pdf reader instead of not in pdf writer in asp.net application

查看:101
本文介绍了我希望pdf文件在pdf阅读器中打开,而不是在asp.net应用程序中的pdf书写器中打开的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个pdf文档,默认情况下要在Adobe Reader中打开.但是在系统中,默认情况下安装了Adobe Acrobat 6.0 writer和Adobe Reader 8.0,我的代码是在asp.net应用程序中的Adobe Acrobat 6.0 writer中打开pdf文档.可以帮助通过C#代码将Adobe Reader 8.0设置为默认值

高度赞赏您的建议

I have a pdf document which i want to open in Adobe Reader by default. but in system Adobe Acrobat 6.0 writer installed & Adobe Reader 8.0 is installed by default my code is opening pdf document in Adobe Acrobat 6.0 writer in my asp.net application. can some one help to make Adobe Reader 8.0 to be default through C# code

your suggestions highly appreciated

推荐答案

您不能强迫客户端使用任何特定应用程序从服务器打开文件:这完全取决于客户端具有的文件关联当前设置.

如果可以在客户端上运行应用程序(再次不能从服务器上运行),则可以通过注册表设置文件关联(此处有一个示例:
You cannot force the client to use any particular application to open a file from the server: It all depends on the file associations that the client has currently set.

If you can run an application on the client (which you again, can''t from the server) then you could set the file associations via the registry (there is an example here: http://stackoverflow.com/questions/69761/how-to-associate-a-file-extension-to-the-current-executable-in-c[^]) but I woudl strongly not recommend it. I have a number of video programs, and some automatically change the file associations. Those are the programs I delete and never install again.


这篇关于我希望pdf文件在pdf阅读器中打开,而不是在asp.net应用程序中的pdf书写器中打开的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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