GithubHelp home page GithubHelp logo

saurabh1e / java-esc-pos-print Goto Github PK

View Code? Open in Web Editor NEW
12.0 5.0 5.0 72 KB

Created for the purpose of serving as a channel among other applications that require printing data on receipt printers using ESC / POS commands.

License: GNU General Public License v3.0

Java 100.00%
pos thermal printer epson print java escpos receipt-printer receipt

java-esc-pos-print's Introduction

Java ESC/POS Print Utility


This utility runs a server on port 7655 and accepts post request with json as follow:

{"type":"INVOICE","nameOfPrinter":"Epson","content":"<CTL_LF>HEADER<TXT_ALIGN_CT><DIV><CTL_LF><DIV>", "printerSize": 58}  

This will print the value of content passed json using the printer with name Epson. Printer Size is used to set the value of divider and Horizontal Tab.


Available Tags

Tag Value
CTL_LF Print and line feed
CAN_HT Cancel Horizontal Tab
HT Horizontal Tab
LINE_SPACE_24 Set the line spacing at 24
LINE_SPACE_30 Set the line spacing at 30
SELECT_BIT_IMAGE_MODE Image
HW_INIT Printer hardware Clear data in buffer and reset modes
CD_KICK_2 Cash Drawer Sends a pulse to pin 2
CD_KICK_5 Cash Drawer Sends a pulse to pin 5
PAPER_FULL_CUT Full cut paper
PAPER_PART_CUT Partial cut paper
TXT_NORMAL Normal text
TXT_2HEIGHT Double height text
TXT_2WIDTH Double width text
TXT_4SQUARE Quad area text
TXT_UNDERL_OFF Underline font OFF
TXT_UNDERL_ON Underline font 1-dot ON
TXT_UNDERL2_ON Underline font 2-dot ON
TXT_BOLD_OFF Bold font OFF
TXT_BOLD_ON Bold font ON
TXT_FONT_A Font type A
TXT_FONT_B Font type B
TXT_ALIGN_LT Left justification
TXT_ALIGN_CT Center justification
TXT_ALIGN_RT Right justification
LEFT_MARGIN Left Margin
TWO_HT Two Horizontal Tabs
THREE_HT Three Horizontal Tabs
DIV Divider Line

ScreenShots

Sits nicely in task bar

Alt text

Logs commands sent

Alt text

java-esc-pos-print's People

Contributors

saurabh1e avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

java-esc-pos-print's Issues

Please provide example for POS Print Receipt

Hi I am Trying to create an application for pos print receipt I am not getting the idea how to design the receipt UI can u please guide or can you please provide an example of this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.