Skip to content

anastaciocintra/escpos-coffee-samples

Repository files navigation

escpos-coffee-samples

Samples projects to use escpos-coffee library https://github.com/anastaciocintra/escpos-coffee

GitHub

Running Samples

tip: build all together as below, otherwise you can get compilation errors.

cd usual
mvn clean package
java -jar [samplename]/target/[samplename]-jar-with-dependencies.jar 
# without argument to list the priter names
java -jar [samplename]/target/[samplename]-jar-with-dependencies.jar "printer name"

Usual Directory

Have samples for most common functions of the escpos-coffee lib, for example, how to print an image or how to print a barcode. It is enough to make a good receipt print.

Miscellaneous Directory

More specific usages of the escpos-coffee:

  • AndroidImage - (android only) How to print an image with Android Studio
  • SerialStream - (desktop only) How to use Serial Port (com1, com2...) Stream
  • SerialStatus - (desktop only) How to get online status of the printer using Serial port I/O
  • Usb4JavaStream - (desktop only) How to use a usb port I/O
  • UsbStatus - (desktop only) How to get on line status of the printer using usb port I/O
  • SliceImage - (android/desktop) How to print big images (beta version to be incorporated on escpos-coffee library)
  • CoffeeBitmap - (desktop only) How to construct Graphics2D, jEditorPane and html/css receipts
  • PdfPrinting - (desktop only) How to print pdf content
  • PdfPrintingAndroid - (android only) How to print pdf content on Android
  • BarcodeGen - How to generate barcode image

Versioning

The version of this project follow the versions of escpos-coffee library and each version have its own branch: For example, the version 4.0.1 can be accessed on branch 4.0.1

The branch master have always the last stable version.

Contributting

Contributors are welcome, but before you do it its important to read and agree with CODE_OF_CONDUCT.md and CONTRIBUTING.md.