从浏览器检测 Adobe Acrobat Reader 是否安装的最佳方法是什么?
从 Web 浏览器检测 Adobe Acrobat Reader 是否安装的最佳方法是什么? 我假设它必须在客户端完成(我不认为 Adobe 添加任何用户代理字符串)。 最好是在 JavaScript 和 Internet Explorer 中,不过如果也能在 FireFox、Safari 等中完成那就更好了……
What's the best way to detect that Adobe Acrobat Reader is installed from a web browser? I'm assuming it would have to be done on the client-side (I don't think Adobe adds any user-agent strings). Preferably in JavaScript and in Internet Explorer, although it would be nice if it could also be done in FireFox, Safari, etc...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
另请注意,即使有人没有 Acrobat Reader 插件,他仍然可以阅读 PDF 文件(例如,通过告诉浏览器启动 kpdf 等外部阅读器)。 因此,即使找不到插件,也允许用户下载 PDF。 更不用说禁用 Javascript 的人(或 NoScript 用户)。
Also note that, even if someone does not have the Acrobat Reader plugin, he might still be able to read PDF files (for instance, by telling the browser to launch an external reader such as kpdf). So allow the user to download the PDF even if the plugin cannot be found. Not to mention the people with Javascript disabled (or NoScript users).
Adobe 网站上的这篇文章应该可以满足您的需求。
编辑
在测试中,它不是 100%,因为我有 acrobat,但它在 IE 6 中没有检测到它。
This article from the Adobe website should get you what you need.
EDIT
In testing this it isn't 100% though, as I have acrobat, but it doesn't detect it in IE 6.