ESC/POS Bluetooth Printing Service for Android POS

 

What is ESC/POS?
ESC/POS Instruction system is a set of proprietary POS printer instruction system invented by EPSON. Most thermal printers on the market are compatible with ESC/POS system instructions.
In short, our common thermal receipt printers all support such a command, as long as the format of the instruction sent to the printer, even the printer of different models and brands will perform the same action. For example, there are corresponding instructions for printing a line of text, wrapping, bolding, etc.

ESC/POS Bluetooth Printing Service: ESC/POS Bluetooth Printing service supports Android 5.0 and above. You do not need additional code to connect and print your Bluetooth thermal receipt printer. The service can be called by any APP program that needs printing function through the print menu. The Settings of APP provide a mechanism to select a printer, set the size of the printer, select the appropriate type of printer, and disconnect the printer after printing. You can also test the printer of your choice.

The ESC/POS Bluetooth Printing service can print directly from any Web page to the Bluetooth Thermal Receipt printer, which can print text and images from the device to the Bluetooth Thermal information Receipt printer. It supports most of the bluetooth thermal note printers on the market and most of the universal Bluetooth printers that can print graphics. There are also many custom print options available.

For example, Datamega's smart Android POS device, Universal Bluetooth printer, Epson, Samsung Bixolon and others all support ESC/POS.

The ESC/POS service agreement can be invoked in five ways:
1. Print through a Web browser: This application will respond to a print request from a Web browser or other Application that supports Android printing, simply browse to the page you want to print, and then select the Print menu.The ESC/POS Bluetooth text printing service will be listed and selected to print web pages on the printer.
2. Print through APP link in Web browser: VERSION 2.1.6 of ESC/POS BT Print service supports APP link.This allows you to print pages directly, skipping the print preview.This feature is most useful when you want to print directly from your Web application without leaving it.
3. Through image sharing menu printing: share the menu, the program will be how to deal with any text from a web browser, file manager, or any other application support image sharing menu, select the image you need to print, the use of stock options, ESC/POS bluetooth image printing service will be listed, select it in the printer to print the image.
4. Print through Text Sharing menu: How this program will respond to any text sharing menu, from web browser or other programs to support text sharing menu, select the text you need to print, click the Share option,ESC/POS Bluetooth Text printing service will be available, select the printer to print text.
5. Print with custom Print Sharing intent: If you have your own application and need to print to a hot receipt printer without writing too much code, then this is the printing service for you.What is listed below is sending the print intent to the ESC POS print service.

Introduction to commonly used print commands

Initializing printer
command

1 ASCII code ESC @
2 Decimal code 27, 64 

illustrate
This instruction will clear the data in the print buffer, but the data in the receive buffer will not be cleared, and is usually called when printing begins.

code

1 byte [] esc_init=new byte[]{27,64}; 2 mDeviceConnection.bulkTransfer(endpointOut, esc_init, esc_init.length, TIME_OUT);

text-align

instruct

1 ASCII code ESC A N 2 decimal code 27 97 n 

Parameter meaning

n type alignment
0, 48 text-align left
1, 49 text-align center
2, 50 text-align right

Code

1 byte [] esc_gravity=new byte[] {27,97,0}//text-align left 2 mDeviceConnection.bulkTransfer(endpointOut, esc_gravity, esc_gravity.length, TIME_OUT); 3 

font bold

instruct

1 ASCII code ESC! n
2 Decimal code 27 33 n

Parameter meaning

n effect
0 Cancel the bold
8 bold

Code

1 byte [] esc_bold=new byte[] {27,33,8}//bold 2 mDeviceConnection.bulkTransfer(endpointOut, esc_bold, esc_bold.length, TIME_OUT); 3

Font double height and width:
instruct

1 ASCII code ESC! n
2 Decimal code 27 33 n

Parameter meaning

n effect
0 normal
16 Double high
32 Double wide

paper feed:

Instruct:

1 ASCII code ESC d n
2 Decimal code 27 100 n

Parameter meaning:
0<=n<=255

Description
Print the data in the buffer and move n lines of paper forward


Xiamen Datamega Technology Co., Ltd. launched several best-selling Android POS Terminal, fully supporting ESC/POS protocol, for example smart-Mini, Smart-Cube, Smart-one, Smart-till, etc. Follow the following links to learn more about Android ESC/POS related products.

www.datamega.net

smart Fiscal pos




评论

此博客中的热门博文

The Basic Function and Introduction of Portable Thermal Printer RPP02N

What are the types of bar code readers?

SMART-TILL:A Revolutionary Tablet POS