Android ESC/POS 通过 WiFi 打印

发布于 2024-11-24 07:42:45 字数 458 浏览 2 评论 0原文

我想编写一个 Android 应用程序,它将按步骤执行以下操作,我希望您帮助我找到合适的 API 以加快该过程。我要使用的打印机支持 ESC/POS 协议。

  1. 使用 WiFi 查找附近的所有打印机。
  2. 它将选择一台打印机,可能是第一台打印机。
  3. 它将发送文本文档到打印机进行打印,并查看是否打印成功。

我发现了一些 API,例如 this。我相信我的问题与这篇文章类似

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.

  1. Find all printers nearby using WiFi.
  2. It will select one printer may be first one.
  3. 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

昇り龍 2024-12-01 07:42:45

我已经研究这个问题很长时间了。那里几乎没有 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文