简体   繁体   中英

creating an ESC/POS java library

I have run into troubles creating a esc/pos java library. Infact I am stumbling at the first hurdle and do not know if it is just the printer I am using. It seems that no matter what I send to it, all it prints is a set of random characters. Even when I send it the initialize command.

Printer is an Epson TM-T20 connected via Serial, from everything I can find this should support standard ESC/POS. I am trying to print to it from realterm with no luck. Has anyone any experience on whether this printer supports this fine and any experience in creating a java library for it? Just need it to output very simple text.

Many thanks.

The Epson TM-T20 should support ESC/POS. I have no experience with this specific printer, but I have experience with serial printers and ESC/POS printers. When it prints random characters, it usually means the your baud rate setting for the serial port is wrong.

Most epson pos printers can print a receipt containing details including there serial settings. Switch the printer off, then hold the feed button and switch the printer on. It should print this receipt. After it has printed this receipt it stays in hexdump mode (it will print anything coming in as a hexdump). Switch it off and on again to return to normal operation.

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