简体   繁体   中英

Java USB POS Printing - Linux

Hi I'm having a problem trying to use USB printers in my linux POS. Currently we only have serial printers and we solve the printing issue using the serial port, but we are buying a new printer model and it's USB, so my code is no longer working. I find out that java printing api is not good solution for me, because I have 3 different versions of linux operating system, and is very difficult to get drivers to install a printing spool to be use by the java api in linux. Anyone has faced this problem? What about using usb directly?

Yes, I had this problem some time ago. No, you can't read directly the USB as a COM port, you need a driver that "understands" the way your printer talk. We did exactly what you don't want to do. We created a module that can print via COM PORT and a module that can print using Java printing API.

To be honest I don't find too problematic the use of drivers in linux, this kind of devices ususally work with generic raw printing drivers and the newer models include native support to linux terminals. Another advantage of using the Java printing api is that you can print in remote terminals, thing that almost all customers want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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