如何使用asp.net禁用Firefox的默认PDF查看器/插件? [英] How to disable Firefox default PDF viewer / Plugin using asp.net?

查看:140
本文介绍了如何使用asp.net禁用Firefox的默认PDF查看器/插件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要禁用Firefox的默认PDF.js查看器通过JavaScript(或)asp.net。我发现在Firefox中选择一个非编程解决方案:

I need to disable Firefox default PDF.js viewer through javascript (or) asp.net. I found one non-programmatic solution in Firefox options:

选项 - >应用程序 - > 内容类型可移植文档格式行动默认$ P $在Firefox PVIEW

Options--> Application-->Content type Portable document Format action default preview in firefox

有我可以改变它使用Adobe Acrobat Reader,但如何才能做到这一点在code?
我们怎样才能在Java脚本code Firefox浏览器的应用程序操作。

There I can change it to use Adobe Acrobat Reader, but how can we do this in code? How can we get the Firefox browser Applications Action in java script code.

推荐答案

如果您有包含PDF响应发送以下标题:

If you send the following header with the response containing the PDF:

Content-Disposition: Attachment

浏览器将其当作一个文件下载,而不是一个文件显示,其开业将与用户默认的PDF查看器中打开时。

The browser will treat it as a file download instead of a document to display, which when opened will open with the users default PDF viewer.

这篇关于如何使用asp.net禁用Firefox的默认PDF查看器/插件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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