Bug 19637 - jsPrintSetup not supported in Firefox Quantum
Summary: jsPrintSetup not supported in Firefox Quantum
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Target Milestone: ---
Assignee: Bugs List
QA Contact: Testopia
Depends on:
Reported: 2017-11-16 12:37 UTC by Stefan Berndtsson
Modified: 2018-05-12 07:50 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Berndtsson 2017-11-16 12:37:48 UTC
This is mainly a heads-up. As of Firefox v57 (Quantum), the addon jsPrintSetup is no longer supported. From what I've been able to tell in the bug reports this is due to missing functionality in the WebExtensions API.

Relevant bug reports:

Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1385827

Addon: https://github.com/edabg/jsprintsetup/issues/39
Comment 1 Josef Moravec 2017-11-17 08:20:29 UTC
And it looks like the needed api will not be implemented by Mozilla...

But there are some possible solutions which could replace the jsPrintSetup in Koha:

https://github.com/WICG/webusb (Chrome 61+)

I think it could be nice to have a solution working in Firefox and Chrome/Chromium, at least...
Comment 2 Marc Véron 2017-11-17 12:32:53 UTC
As a temporary solution see the following from:
(Bug was filed by the author of JSPrintSetup afaik)

For all that need the functionality NOW: its better to install the current ESR version ( https://www.mozilla.org/en-US/firefox/organizations/faq/ ) instead of going back to version 56 and turning off updates:
---End snip---
Comment 3 Michal Denar 2017-11-20 16:49:29 UTC
Firefox stop print without customer permission. It's look like end of silent printing in Firefox.

"Just to be clear, the goal of WebExtensions is an API in a web browser to improve users interaction with web content. Supporting POS systems is not part of the goal for WebExtensions. Every feature we add has a cost on Mozilla in terms of development and maintenance so we evaluate each API. There are some improvements that around printing that have landed and perhaps there's a couple of APIs that could be split out from that bug.
If you want to provide more sophisticated printing solutions or support POS systems, you might need to find a different solution other than Firefox. You can pass data through the nativeMessaging API which can do the printing for you, as an example.

For the moment, we'll close the comments on this bug as it's currently not being productive."
Source: https://bugzilla.mozilla.org/show_bug.cgi?id=1385827
---End snip---

So, now we can start debate about long time solution. Maybe outside Firefox or based on Firefox about:config setiings for smooth printing from Koha with printing dialog.

WebUSB API can be solution, for many USB POS printers, but it's partially implemented in Chrome not in Firefox. https://wicg.github.io/webusb/#introduction

But it brings too much questions about security how describe this article https://wicg.github.io/webusb/#security-and-privacy. Firefox decide cut off JS driven printing due security reasons.
Comment 4 Marc Véron 2017-12-09 14:56:40 UTC
(In reply to Mike from comment #3)
(...) You
> can pass data through the nativeMessaging API which can do the printing for
> you, as an example.
Comment 5 Michal Denar 2017-12-20 10:21:21 UTC
On JSprint Github was debate about implemenation via nativeMessaging API. But All was very skeptic about it.

So, I've made some researh and QZ library looks like aceptable solution. It's very similar like JSprint on Koha side. He re is just one complication, because Java app must be sef-signed and compilated for each Koha domain instalation.

More here:

So community, can we accept QZ as solution? Side effect is better support for more browsers like Chrome.