javascript 如何在 Chrome 和 Firefox 浏览器中显示 3D PDF

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25059121/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 03:49:42  来源:igfitidea点击:

How to display 3D PDF in Chrome & Firefox Browser

javascriptgoogle-chromefirefoxpdf

提问by Nirav Mehta

I've to display 3D PDF in browser and few browsers doesn't support 3D PDF like Chrome, Firefox, Mobile browser.

我必须在浏览器中显示 3D PDF,很少有浏览器不支持 3D PDF,如 Chrome、Firefox、Mobile 浏览器。

How can we detect / update the default PDF viewer plugin in Chrome & Firefox through code?

我们如何通过代码检测/更新 Chrome 和 Firefox 中的默认 PDF 查看器插件?

Can detect Adobe Reader plugins for all the browser as well using this code.

也可以使用此代码检测所有浏览器的 Adob​​e Reader 插件。

My query is I want to disable the default PDF viewer plugin and enable Adobe Reader plugin through code [javascript]. Is there any possible solution for this?

我的查询是我想禁用默认的 PDF 查看器插件并通过代码 [javascript] 启用 Adob​​e Reader 插件。有什么可能的解决方案吗?

采纳答案by Nirav Mehta

I've got work around to display 3D PDF in Chrome but disabling the default PDF Viewer plugins and enabling the Adobe Reader plugins from chrome://plugins/ in chrome browser.

我有办法在 Chrome 中显示 3D PDF,但禁用默认的 PDF 查看器插件并在 chrome 浏览器中从 chrome://plugins/ 启用 Adob​​e Reader 插件。

Chrome Plugins Settings:

Chrome插件设置:

Chrome Plugins Settings

Chrome 插件设置

Firefox Plugins Settings: Firefox Plugins Settings

火狐插件设置: 火狐插件设置

But still looking for this settings to be updated from code.

但仍在寻找要从代码更新此设置。

回答by M. Abu ul fazal

Since Google has disabled the NPAPI support, therefore, Adobe reader cannot be configured to view PDF file within Chrome and many other modern browsers. See link below:

由于谷歌已禁用 NPAPI 支持,因此,Adobe 阅读器无法配置为在 Chrome 和许多其他现代浏览器中查看 PDF 文件。请参阅以下链接:

https://helpx.adobe.com/acrobat/kb/change-in-support-for-acrobat-and-reader-plug-ins-in-modern-web-.html

https://helpx.adobe.com/acrobat/kb/change-in-support-for-acrobat-and-reader-plug-ins-in-modern-web-.html