為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Is there a possibility to change the print_printer setting within an addon?

more options

I am developing a warehouse system including POS as a web application. For the POS it is necessary to change the printer for the receipt and the reports. One is a standard letter printer and the other an EPSON TM-T20II Receipt printer.

In the previous API it was possible to make changes to the printer settings. But the new API does not allow to access the print_printer setting at all. Is there any possibility to get this option back? In the actual version only a few parameters are supported:

browserSettings.allowPopupsForUserEvents

   Determines whether code running in web pages can display popups in response to user events.

browserSettings.cacheEnabled

   Determines whether the browser cache is enabled or not.

browserSettings.homepageOverride

   Read the value of the browser's home page.

browserSettings.imageAnimationBehavior

   Determines how the browser treats animated images.

browserSettings.newTabPageOverride

   Read the value of the browser's new tab page.

browserSettings.webNotificationsDisabled

   Prevents websites from showing notifications using the Notification Web API.
I am developing a warehouse system including POS as a web application. For the POS it is necessary to change the printer for the receipt and the reports. One is a standard letter printer and the other an EPSON TM-T20II Receipt printer. In the previous API it was possible to make changes to the printer settings. But the new API does not allow to access the print_printer setting at all. Is there any possibility to get this option back? In the actual version only a few parameters are supported: browserSettings.allowPopupsForUserEvents Determines whether code running in web pages can display popups in response to user events. browserSettings.cacheEnabled Determines whether the browser cache is enabled or not. browserSettings.homepageOverride Read the value of the browser's home page. browserSettings.imageAnimationBehavior Determines how the browser treats animated images. browserSettings.newTabPageOverride Read the value of the browser's new tab page. browserSettings.webNotificationsDisabled Prevents websites from showing notifications using the Notification Web API.

所有回覆 (5)

more options

Hey there, you should ask this question on irc.mozilla.org/6667 in channel #addons they'll be able to help you out, also see the documentation for developing WebExtensions here: https://developer.mozilla.org/en-US/Add-ons/WebExtensions

more options

Thanks for the reply! Actually I spent several hours on the docs and tried to find anything on google - without any result. The new WebExtension API simply does not cover all the features of the old AddOn architecture :-(

more options

Yeah, I know it can be frustrating, but it was done for security and performance reasons. I hope you understand.

more options

Well - changing the behavior of image anomations is nice but useless. Not beeing able to change the selected printer is ruling out Firefox for professional applications. I can't see any security reasons, why it should be impossible to simply change the printer before print with an addon. There is only one parameter to change (print_printer), what can be done on the about:config page manually.

As I see there is no possibility to increase the usability of my software while using firefox. So I have to evaluate other browsers instead...

more options

All the new WebExtensions API's aren't completed yet. They are liable to "trickle out" slowly for months yet until extension developers can really see what's available for the long term.

Personally I think it was a mistake to release Quantum before all the planned API's were completed and on par with what was available in the past. But hey, I am just another user who has had gripes about the poor state of printing from Firefox for as long as I have been using it - since Phoenix 0.3 in Aug 2002.

Quite honestly, following Mkll advice about asking about this issue in a developers fora or on irc would be the best way to "talk to" people who might be able to provide some expert guidance. This forum is primarily for end user support and the collective knowledge of the contributor's here isnt very strong in the "development for Firefox" arena.