Android ESC/POS 通过 WiFi 打印
我想编写一个 Android 应用程序,它将按步骤执行以下操作,我希望您帮助我找到合适的 API 以加快该过程。我要使用的打印机支持 ESC/POS 协议。
- 使用 WiFi 查找附近的所有打印机。
- 它将选择一台打印机,可能是第一台打印机。
- 它将发送文本文档到打印机进行打印,并查看是否打印成功。
I want to write an Android app which will do following in steps and I want you to help me find right APIs for them to speed up the process. The printer I am going to use supports ESC/POS protocols.
- Find all printers nearby using WiFi.
- It will select one printer may be first one.
- It will send a text document to printer for printing and will see if it was printed successfully.
I found some APIs like this. I believe my problem is similar to this post
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经研究这个问题很长时间了。那里几乎没有 API,更不用说好的 API 了。到目前为止,我唯一能使用的是 Epson Android SDK。
它支持多种 wifi 和蓝牙爱普生打印机。只需几行代码,您就可以找到要打印的打印机的 IP 地址,然后将行添加到要打印的文档中。他们还有一个很好的示例应用程序,其中包含您可能想做的各种操作。
可以手动编写ESC命令,但是非常复杂。这就是为什么像 JavaPos 这样的东西被开发出来,试图抽象出这些细节。但是,这里是 ESC 命令的爱普生手册更新
:
epson android sdk 链接已过期。这是 最新链接
I have been looking into this for a long time. There are almost no APIs out there, much less good APIs. The only one I have gotten to work so far is the Epson Android SDK.
This supports a number of wifi and bluetooth epson printers. With just a few lines of code, you can find the IP address of the printer you want to print with, and then add lines to the document to print. They also have a good sample app that has every kind of operation you might want to do.
You can manually write ESC commands, but it is very complecated. That is why things like JavaPos were developed, to attempt to abstract these details away. However, here is an Epson manual for ESC commands
UPDATE:
the epson android sdk link is out of date. Here is an up-to-date link