[removed] Send raw text to printer - no server requests/method calls, able to work offline, purely clientside

前端 未结 5 1670
既然无缘
既然无缘 2020-12-07 18:14

My thorough research on the web provided me with a couple of ideas, but none of them seem to work correctly in my particular use case. Here is what I have:

1) Zebra

5条回答
  •  借酒劲吻你
    2020-12-07 18:57

    You see, the main problem here is that the Zebra commands will only work if you can send the raw, unmodified bytes directly to the printer port; the browser won't allow you to do that, unfortunately.

    You will need some way to get such direct acess:

    • One way would be through a browser extension, so you'd have less restricted access to the hardware; you could do that through NPAPI, but Chrome does not support that, and both Mozilla and IE will cease supporting that really soon;; Chrome can allow direct access to the hardware through the Native Messaging API; Mozilla may support a similar solution really soon;
    • Another option would be to use a Java JNLP application to provide such an access, and it can be called from a browser.

提交回复
热议问题