简体   繁体   English

iOS如何自动检测网络打印机

[英]How iOS detects network printer automatically

POS systems mostly can detect thermal printers automatically, as far as I know there are only two ways for an installed application on ios to do that, either by faking it as an Airprint or going with IPP protocol. POS系统通常可以自动检测热敏打印机,据我所知,只有两种方法可以使ios上已安装的应用程序伪装成Airprint或采用IPP协议。 Since it mostly matters for those application that your printer should be on the same network and subnet configuration and Airprint doesn't support thermal printers, I believe that could be choice that they are using. 因为对于那些应用程序来说,打印机应该使用相同的网络和子网配置最为重要,而Airprint不支持热敏打印机,所以我认为这可能是他们使用的选择。 But my question is that if there is another way that they are all doing it? 但是我的问题是,他们是否还有另一种方式呢? if not how an application on ipad(iOS) can detect those printers without any need for specific driver installation? 如果不是,ipad(iOS)上的应用程序如何可以检测那些打印机而无需安装特定的驱动程序? If anyone can help me with this would be great! 如果有人可以帮助我,那就太好了!

To print to printers from iOS you can either use the AirPrint API with AirPrint enabled printers or you can implement the printer's protocol and PDL within your own application. 要从iOS打印到打印机,您可以将AirPrint API启用AirPrint的打印机一起使用,也可以在自己的应用程序中实现打印机的协议和PDL。

Some solutions include a third middleware like component to fill the gap between the mobile app and the actual device. 一些解决方案包括类似于组件的第三种中间件,以填补移动应用程序与实际设备之间的空白。 This is not an elegant way but seems to work for some usecases. 这不是一种优雅的方法,但是似乎可以在某些用例中使用。

The full process consists indeed of two steps: discovery (like setup) and actual printing (like sending a document). 整个过程实际上包括两个步骤:发现(如设置)和实际打印(如发送文档)。 With AirPrint you can check the documentation to learn how Bonjour aka ZeroConf works. 使用AirPrint,您可以查看文档以了解Bonjour或ZeroConf的工作原理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM