我打算为商店创建一个系统。我将使用安卓平板电脑和收据打印机。我打算使用的打印机不支持 Android。
我的问题是:
- 我可以为打印机创建驱动程序吗?
- 我是否需要了解有关打印机的任何信息,例如(芯片或任何其他电子产品)
- 创建驱动程序难吗?
非常感谢
我会尽量避免这种设置。商店和收据这两个词听起来好像需要一些可靠性和用户友好性。今天,与打印机的通信大多是双向的,因为它们会发回各种信息。至少处理其中一些(碳粉不足,纸张用完)肯定会对您的用户有所帮助。除此之外,对特定打印机的协议进行逆向工程并不一定很有趣,尤其是如果您对打印机协议没有经验的话。此外,低成本打印机将各种逻辑委托给驱动程序,因为这降低了设备的成本。我不会依赖可用的相关文档。
您选择的打印机是否适合的一个很好的指示可能是它是否受某些开源打印框架的支持。这样的框架也可能是您回答相关问题的第一个地址。
只是我的两分钱。
I believe that the best choice would be to firstly try some open-source printer software which might work with this printer. If any open-source software doesn't work, you would get a good understanding after going over the open-source driver for another similar printer.
You would not be needing to know information about the chip and other electronic stuff to write a driver. Although, you would need a documentation of the printer which says the protocol the printer follows.
I don't think that it should be really tough writing a driver for a printer, although it depends on how much flexible driver you want to write. If you want to write a driver which just fulfils the specialized jobs you want it to do, the driver should not be tough to write although the driver could not then be extended beyond the requirements of your application and not used for any generic use. If you want to write a generic driver which can be used to print anything, then it might not be that easy.
您是否绝对必须使用特定的打印机型号?因为如果没有,您可能想看看Google Cloud Print。您将需要一个兼容 Android 的应用程序(其中有很多,列表可在此处获得)和云就绪打印机(同样,其中有很多,您可以在此处找到列表),或传统打印机,那里也是一种连接它们的方法。