在 Chrome 浏览器上删除 NPAPI 后替代 Jzebra/QZ Java Raw Print Plugin
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/27057816/
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
Alternative to Jzebra/QZ Java Raw Print Plugin after NPAPI being dropped on Chrome Browser
提问by anestis
We all know that NPAPI will be completely removed from Chrome in a few months.
我们都知道 NPAPI 将在几个月内从 Chrome 中完全删除。
What would be an alternative to the Jzebra/QZ Java plugin that makes raw printing (sending raw ESC/P commands) to POS printers?
什么是 Jzebra/QZ Java 插件的替代品,它使原始打印(发送原始 ESC/P 命令)到 POS 打印机?
Is there a Chrome API (HTML5 and Javascript) that will be able to replace the communication between the browser and the locally installed POS printers in USB or Ethernet?
是否有 Chrome API(HTML5 和 Javascript)可以替代浏览器与 USB 或以太网中本地安装的 POS 打印机之间的通信?
回答by tresf
Is there a Chrome API (HTML5 and Javascript) that will be able to replace the communication between the browser and the locally installed POS printers in USB or Ethernet?
是否有 Chrome API(HTML5 和 Javascript)可以替代浏览器与 USB 或以太网中本地安装的 POS 打印机之间的通信?
Update:A pure HTML5 solution exists for USB devices, but examples are currently hard to find and browser adoption has been slow:
更新:存在适用于 USB 设备的纯 HTML5 解决方案,但目前很难找到示例,并且浏览器的采用速度很慢:
- WebUSBUSB devices only, select browsers.
- 仅限 WebUSBUSB 设备,选择浏览器。
In regards to HTML5 and JavaScript, since the removal of NPAPI, the solution tends to involve WebSocket to localhost, or cloud-enabled printers.
关于 HTML5 和 JavaScript,由于删除了 NPAPI,解决方案往往涉及 WebSocket 到 localhost,或支持云的打印机。
This HTTP/WebSockets design is used by:
此 HTTP/WebSockets 设计用于:
- Zebra Link-OSand Cloud Connect(for label printing, etc)
- Epson ePOS-Device(for receipts, display, barcode scanner)
- Dymo JavaScript Framework 2.0(for label printing, etc)
- PrintNode
- Google Cloud Print(Slated for retirement Dec 2020)
- QZ Tray software(the successor to "JZebra/QZ-Print", labels, receipts, anything raw, PDFs, HTML, USB Scales, USB barcode readers, serial devices)
- Zebra Link-OS和Cloud Connect(用于标签打印等)
- Epson ePOS 设备(用于收据、展示、条码扫描仪)
- Dymo JavaScript Framework 2.0(用于标签打印等)
- 打印节点
- Google 云打印(计划于 2020 年 12 月停用)
- QZ Tray 软件(“JZebra/QZ-Print”的继承者、标签、收据、任何原始文件、PDF、HTML、USB 秤、USB 条码阅读器、串行设备)
In regards to Point-Of-Sale specific printing, I have been unable to locate a ready solution that meets these needs (pure HTML5 and JavaScript, widely adopted), so either a Desktop-installed middle-ware or a server-side middle-ware is currently the way to achieve what you are describing.
关于销售点特定的打印,我一直无法找到满足这些需求的现成解决方案(纯 HTML5 和 JavaScript,广泛采用),因此无论是桌面安装的中间件还是服务器端中间件—— ware 目前是实现您所描述的内容的方法。
Full disclaimer, we're the authors of QZ Tray.
完全免责声明,我们是 QZ Tray 的作者。
回答by user1912424
You could try PrintNodewhich has a simple desktop client and json API. It's really quick and has lots of libs: https://github.com/PrintNode/
您可以尝试使用具有简单桌面客户端和 json API 的PrintNode。它真的很快并且有很多库:https: //github.com/PrintNode/
回答by Stenerson
I've had good luck with Epson's ePOS-Print JavaScript SDK. It is Epson specific and does require a network interface card that supports ePOS (UB-E04/R04).
我很幸运使用Epson 的 ePOS-Print JavaScript SDK。它是 Epson 特定的,并且确实需要支持 ePOS (UB-E04/R04) 的网络接口卡。