Java Fiscal Device API

The Java Fiscal Device API is a medium-level API to communicate with fiscal devices such as fiscal printers. It handles the communication protocol, the formatting and parsing of the protocol packets, and provides event-based notification for certain events such as out-of-paper events. It was made for Hasar printers (in use in Argentina and other countries) but also works fine with Epson printers after some small protocol differences were accommodated.

You can download the whole thing from here. It is provided under the GNU GPL license, see the included LICENSE.txt file for details.

Where do I start?

Well that is your predicament, but you can try the API documentation. These interfaces will probably be the most interesting to you:
and these classes encapsulate all the configuration options:
Additionally, com.taliter.fiscal.device.hasar.HasarConstants defines some useful constants for Hasar printers. The documentation for these is written in spanish. If you are using another brand of printer it is up to you to check with the printer's manual, these constants may or may not be useful to you. Beware that some commands may produce irreversible changes to your printer, even to the point of rendering it useless, so read the manual carefully.

You may want to take a look into package com.taliter.fiscal.util. It contains tools that provide protocol and port speed autodetection, as well as event and communication loggers that can assist you during development.

Finally, if you have not had enough, there is this pityful sample lying around.

And what else?

Not much really. This software is 2003, Rodrigo Balerdi. Use it at your own risk. You can contact me at: lanchon at hotmail dot com. Please drop me a line if you use this software, tell me if it worked with your printer model, or what you are doing, or whatever. Regards,