我正在寻找在flutter中打印到热敏网络打印机的方法。我发现了一些很棒的插件,但它们似乎都打印到有IP地址的打印机上,而不是连接到计算机并在网络上共享的打印机,例如\server\printer1。我的打印机没有网络硬件,它通过USB连接到运行Windows的计算机。
有没有插件或技术可以像那样连接到打印机,或者我使用的插件有误吗?或者,有没有办法让共享打印机拥有自己的IP地址?
作为示例,以下是我到目前为止使用插件esc_pos_printer所做的尝试
final PosPrintResult res = await printer.connect('192.168.29.94', port: 9100);
// and also used the IP and shared name of the printer
final PosPrintResult res = await printer.connect('\\\\192.168.29.94\\MP-4200 TH', port: 9100);
我总是得到这样的错误:“错误。打印机连接超时”
谢谢你的帮助。
发布于 2021-09-01 11:15:29
我没有足够的windows应用程序开发经验,但你可以使用method-channel来实现你的目标。下面是参考:https://flutter.dev/docs/development/platform-integration/c-interop
我已经集成了斑马打印机使用android (java代码),如果你需要任何帮助或演示代码,请让我知道。
https://stackoverflow.com/questions/67040735
复制相似问题