简体   繁体   中英

Server-side network printing in java / grails

I am java / grails developer working on redesigning a software system.

One of the requirements is to have a sever-side application send data to various network printers to print text data.

I searched the web for info on java network printing, and came up short I looked into Java Print Service API, java.awt.print, javax.print and did not find anything on connecting to network printers.

Is what I am trying to do possible or favorable. The lack of findings leads me to believe that sever-side software does not interact with network printers directly.

If it can be done, please point me to some resources.

Network printers are typically treated no differently from locally connected printers; they are set up in the OS first and this makes them available to the Java Print Service.

If you need to print directly to a POS printer, they usually have their own binary protocol that you can use over TCP/UDP. Epson has the ESC/POS system, for example.

Depending on the print server, you may be able to send PostScript straight to the printer via CUPS/LRP/LPD/IPP. See http://www.cups4j.org and http://lpdspooler.sourceforge.net .

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