1

Is it possible to make Firefox or Chrome browsers open print dialog box when opening a specific file (extension)? I have a system which I access using internet browser and it produces .ODT/.PDF reports which I'd like to send directly to a printer instead of Downloading/Opening/Printing steps. Unfortunately can't use any javascript on the server side (although client side scripting is possible). It's also possible to change file extension of those reports to anything I want.

4

1 回答 1

1

我对此进行了相当多的研究,似乎没有一种简单的方法可以做到这一点。

NPAPI 插件(例如使用“Firebreath”创建的插件)可以做到这一点,但需要针对它运行的每个平台进行编译(类似于将 Flash 作为浏览器插件加载)。你必须从头开始构建这个插件。让这个插件在 Google Play 商店中列出是 Chrome 用户安装它的唯一方法,这是 25 美元的注册费,以及谷歌的代码审查(因为它使用 NPAPI)。请注意,Firebreath 还创建了一个可在 Internet Explorer 中使用的 ActiveX 插件。

如果您愿意使用 Java,有一个名为“ jZebra ”的项目,它从 Web 浏览器打印 PDF 的功能非常有限,但它需要加载 Java Applet。

-特雷斯

于 2013-05-15T19:39:06.847 回答