All Projects → anastaciocintra → escpos-coffee

anastaciocintra / escpos-coffee

Licence: MIT license
Java library for ESC/POS printer

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to escpos-coffee

escpos-coffee-samples
anastaciocintra.github.io/escpos-coffee
Stars: ✭ 29 (-83.14%)
Mutual labels:  barcode, escpos, escpos-printer, escpos-coffee
quickprinter
[Quick Printer] Created for the purpose of serving as a channel among other applications that require printing data on receipt printers using ESC / POS commands.
Stars: ✭ 99 (-42.44%)
Mutual labels:  escpos, receipt-printer, escpos-printer
Escpos Php
PHP library for printing to ESC/POS-compatible thermal and impact printers
Stars: ✭ 1,851 (+976.16%)
Mutual labels:  barcode, escpos, receipt-printer
ESCPOS
A ESC/POS Printer Commands Helper
Stars: ✭ 26 (-84.88%)
Mutual labels:  qrcode, barcode, escpos
ZZYQRCode
a scanner for QRCode barCode 最好用的ios二维码、条形码,扫描、生成框架,支持闪光灯,从相册获取,扫描音效等,高仿微信,微博
Stars: ✭ 124 (-27.91%)
Mutual labels:  qrcode, barcode
taro-code
Taro Barcode & QRCode
Stars: ✭ 88 (-48.84%)
Mutual labels:  qrcode, barcode
barcode
No description or website provided.
Stars: ✭ 27 (-84.3%)
Mutual labels:  qrcode, barcode
javascript-barcode
Dynamsoft Barcode Reader JavaScript SDK for package managers. PDF417, QR Code, DataMatrix, MaxiCode and more are supported.
Stars: ✭ 142 (-17.44%)
Mutual labels:  qrcode, barcode
Nbzxing
🔥 2020年最好用的开源扫码,全方位优化,强烈推荐!! 支持多种常规zxing无法扫出的码,用就完了!! 🔥
Stars: ✭ 184 (+6.98%)
Mutual labels:  qrcode, barcode
api2pdf.php
PHP client library for the Api2Pdf.com REST API - Convert HTML to PDF, URL to PDF, Office Docs to PDF, Merge PDFs, HTML to Image, URL to Image, HTML to Docx, HTML to Xlsx, PDF to HTML, Thumbnail preview of office files
Stars: ✭ 42 (-75.58%)
Mutual labels:  qrcode, barcode
esc pos bluetooth
ESC/POS (thermal, receipt) printing for Flutter & Dart (Android/iOS)
Stars: ✭ 177 (+2.91%)
Mutual labels:  receipt-printer, thermal-printer
Qrcodereader
Barcode and QR code reader built in Swift
Stars: ✭ 237 (+37.79%)
Mutual labels:  qrcode, barcode
Qrcoder
A pure C# Open Source QR Code implementation
Stars: ✭ 2,794 (+1524.42%)
Mutual labels:  qrcode, barcode
barcode-detector
Spec compliant polyfill of the Barcode Detection API 🤳
Stars: ✭ 31 (-81.98%)
Mutual labels:  qrcode, barcode
Escpos Thermalprinter Android
Useful library to help Android developpers to print with (Bluetooth, TCP, USB) ESC/POS thermal printer.
Stars: ✭ 204 (+18.6%)
Mutual labels:  qrcode, barcode
react-native-thermal-receipt-printer-image-qr
React native thermal receipt printer
Stars: ✭ 71 (-58.72%)
Mutual labels:  qrcode, thermal-printer
react-native-smart-code
Support React & ReactNative.In react-native,it's create base64 String,which is qrcode or barcode ,and without webview.In react,we use jsbarcode.
Stars: ✭ 14 (-91.86%)
Mutual labels:  qrcode, barcode
barcode-server
Barcode Server for Barcode Client-Server android application
Stars: ✭ 40 (-76.74%)
Mutual labels:  qrcode, barcode
BarcodeReader
Simple multi-format barcode reader for Windows
Stars: ✭ 26 (-84.88%)
Mutual labels:  qrcode, barcode
Rxtool
Android开发人员不得不收集的工具类集合 | 支付宝支付 | 微信支付(统一下单) | 微信分享 | Zip4j压缩(支持分卷压缩与加密) | 一键集成UCrop选择圆形头像 | 一键集成二维码和条形码的扫描与生成 | 常用Dialog | WebView的封装可播放视频 | 仿斗鱼滑动验证码 | Toast封装 | 震动 | GPS | Location定位 | 图片缩放 | Exif 图片添加地理位置信息(经纬度) | 蛛网等级 | 颜色选择器 | ArcGis | VTPK | 编译运行一下说不定会找到惊喜
Stars: ✭ 11,567 (+6625%)
Mutual labels:  qrcode, barcode

escpos-coffee

https://github.com/anastaciocintra/escpos-coffee

GitHub Java CI with Maven Maven Central Sonatype Nexus (Snapshots)

Java library for ESC/POS printer commands. Can send text, images and barcodes to the printer. All commands are send to one OutputStream, then you can redirect to printer, file or network.

Compatible / Tested platforms

  • Linux
  • FreeBsd
  • Windows
  • MacOS
  • Android Mobile

Wiki

Code Examples

Getting Started

sending "hello world" to the printer

import com.github.anastaciocintra.escpos.EscPos;
import com.github.anastaciocintra.output.PrinterOutputStream;

import javax.print.PrintService;
import java.io.IOException;

public class HelloWorld {
    public static void main(String[] args) throws IOException {
        if(args.length!=1){
            System.out.println("Usage: java -jar escpos-simple.jar (\"printer name\")");
            System.out.println("Printer list to use:");
            String[] printServicesNames = PrinterOutputStream.getListPrintServicesNames();
            for(String printServiceName: printServicesNames){
                System.out.println(printServiceName);
            }

            System.exit(0);
        }

        PrintService printService = PrinterOutputStream.getPrintServiceByName(args[0]);
        PrinterOutputStream printerOutputStream = new PrinterOutputStream(printService);
        EscPos escpos = new EscPos(printerOutputStream);
        escpos.writeLF("Hello world");
        escpos.feed(5).cut(EscPos.CutMode.FULL);
        escpos.close();
    }
}

Installation with Maven

<dependency>
  <groupId>com.github.anastaciocintra</groupId>
  <artifactId>escpos-coffee</artifactId>
  <version>4.1.0</version>
</dependency>

Installation with Gradle

Step 1. Add the repository to your build file

repositories {
    mavenCentral()
}

Step 2. Add the dependency

dependencies {
    implementation 'com.github.anastaciocintra:escpos-coffee:4.1.0'
}

Installation without Maven or Gradle

Download code from the last release of escpos-coffee.

The project can be compiled with the below command:


mvn clean package

Then the jar file will be generated inside the 'target/' folder, just add the jar file to your classpath.

Samples

You can find all samples codes on https://github.com/anastaciocintra/escpos-coffee-samples

getstart sample

getstart - Send info of the library to the printer.

output

textstyle sample

textstyle - Shows how to construnct one simple receipt.

output

Also this sample show how simple is to create diferent text styles, like title, subtitle, bold, etc.

  Style title = new Style()
          .setFontSize(Style.FontSize._3, Style.FontSize._3)
          .setJustification(EscPosConst.Justification.Center);

graphicsimage, bitimage and rasterimage samples

Shows how to work with ImageWrapper.

Then you will see things like how to print on center-justified one image, like this:

    escpos.writeLF("print on Center");
    imageWrapper.setJustification(EscPosConst.Justification.Center);
    escpos.write(imageWrapper, escposImage);

dithering sample

dithering - Shows how to work with BitonalThreshold and BitonalOrderedDither.

output

output

Bellow, we can see how to use ordered dither class.

  algorithm = new BitonalOrderedDither();
  EscPosImage escposImage = new EscPosImage(new CoffeeImageImpl(imageBufferedImage), algorithm);     
  escpos.write(imageWrapper, escposImage);

barcode sample

barcode - Shows barcode, PDF417 and qrcode.

output

output

output

Bellow, code to send barcode to the printer

  BarCode barcode = new BarCode();
  escpos.write(barcode, "hello barcode");

codetable sample

charcode - Shows how to send texts from different languages.

  escpos.setCharacterCodeTable(CharacterCodeTable.CP863_Canadian_French);
  escpos.writeLF("Liberté et Fraternité.");

Others

Android - How to use this lib on Android Studio project.

BarcodeGen - How to generate barcode image and print it

PdfPrinting - How to print pdf files

CoffeeBitmap - How to construct html/css receipts

output

Versioning

Using SemVer for versioning.

Lastest release here.

Contributting

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

Acknowledgments

I would like to thanks Michael Billington and contributors for the great work on the mike42/escpos-php project that inspired me to start this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].