SunmiPrinter Developer documentation

Similar documents
private static String TAG = BluetoothUtils.class.getSimpleName();

Hybrid Apps Combining HTML5 + JAVASCRIPT + ANDROID

Termite WiFi Direct API

BluPrints Thermal Receipt Printer

Windows Driver Manual SRP-352plusIII Thermal printer Rev. 1.02

DIR-E58III Mobile Print

This lecture. The BrowserIntent Example (cont d)

Windows Driver Manual SRP-350III Thermal printer Rev. 1.00

Bluetooth. Mobila applikationer och trådlösa nät HI /3/2013. Lecturer: Anders Lindström,

Mobile Programming Practice Background processing AsynTask Service Broadcast receiver Lab #5

ANDROID SERVICES, BROADCAST RECEIVER, APPLICATION RESOURCES AND PROCESS

Android Services & Local IPC: Overview of Programming Bound Services

Windows Driver Manual SRP-350IIOBE Thermal printer Rev. 1.00

Android. Broadcasts Services Notifications

Services. Marco Ronchetti Università degli Studi di Trento

Windows Driver Manual SRP-382 Thermal printer Rev. 1.00

AOPOS T250II THERMAL RECEIPT PRINTER

RP-D10 / RP-E10 SERIES POS PRINTER

EMBEDDED SYSTEMS PROGRAMMING Android Services

Windows Driver Manual SRP-350II Thermal printer Rev. 1.03

ZEBRA LP/TLP2844 PRINTER SPECIFICATIONS

BITalino Java Application Programming Interface. Documentation Android API

Windows Driver Manual SRP-S300 Thermal printer Rev. 1.01

Windows Driver Manual SRP-150 Thermal Printer Rev. 1.05

QuickSpecs. Epson TM-m30 Ethernet USB Printer. Models. Introduction. Key Benefits. Overview

4 Pr P i r n i t n e t r e Co C m o m m a m n a d n s d Li L s i t N. C m o m m a m n a d

QuickSpecs. EpsonTM88VI Serial Ethernet USB Printer only. Epson TM88VI Serial Ethernet USB Printer. Models. Introduction. Key Benefits.

SmartPOS7. User Manual

Windows Driver Manual SRP-F310 Thermal printer Rev. 1.01

PH640. Software Setup Guide Rev 1.0 my.okidata.com

CS378 -Mobile Computing. Services and Broadcast Receivers

Implementing a Download Background Service

Pd290 THERMAL RECEIPT PRINTER. Proficient in Commercial POS Receipt printers

Services are software components designed specifically to perform long background operations.

Tally Dascom DT-210/230 Programming Guide V1.1

80MM Thermal Receipt Printer

Windows Driver Manual SPP-R220 Mobile Printer Rev. 1.00

Windows Driver Manual SRP-350II Thermal printer Rev. 1.04

IMPACT DOT-MATRIX PRINTER

MPP6800 series - PANEL MOUNT PRINTERS. Options

58mm Thermal Receipt Printer - Operating Manual

SRP-QE300/QE302 THERMAL RECEIPT PRINTER

Windows Driver Manual SPP-R310 Mobile Printer Rev. 1.01

Barcode Scanner SDK Handbook. MT65 Platform

Compact yet Solid, SPP-R200

Software Manual. Applicable Models TSP100IIIU TSP100IIIBI TSP100IIILAN TSP100IIIW TSP100ECO TSP100GT TSP100LAN TSP100U/PUSB. Rev. 7.

Software Manual. Rev.1.2

Table of Contents. Part I Introduction 3 Part II Installation 3. Part III How to Distribute It? 3 Part IV Office 2007 &

AutoTest USER MANUAL. MPT-II Thermal Printer. MPT-II User Manual

Windows Driver Manual SRP-350plus Thermal Printer Rev. 2.07

Pro5 IMPACT DOT-MATRIX PRINTER. Proficient in Commercial POS Receipt Printers

NIPPON PRIMEX PRINTER GUIDE

The one that creates a new trend

Windows Driver Manual SRP-350plus Thermal Printer Rev. 2.03

DOT MATRIX REMOTE PRINTER SETUP GUIDE

SPRT POS Thermal printer user manual

Android Fundamentals - Part 1

POS Hardware :: THE COMPLETE POS HARDWARE KIT INCLUDES: WLR8900 CCD LR SCANNER :: POS SHOE :: WKB1155 POS KEYBOARD WCD5000 CASH DRAWER

80mm Thermal Receipt Printer With Auto Cutter

App Development for Smart Devices. Lec #16: Networking

1D/2D android secondary development

Software Practice 3 Today s lecture Today s Task

Windows Driver Manual SPP-R400 Mobile Printer Rev. 1.05

Automated Generation of Event-Oriented Exploits in Android Hybrid Apps

Foreword 0. GetActualSize... Method GetPatternData... Method. SaveAsMemory... Method. Orientation Enumeration

Overview: Product Overview UHF RFID Desktop Printer

PT340/PT341. Windows Driver User s Guide

IBM SureMark Printers

Foreword 0. PreferredFormat... Property. GetActualSize... Method. SetStructuredAppend... Method

Android User Interface

THERMAL RECEIPT PRINTER

Command Manual.

INTRODUCTION TO ANDROID

LEITZ ICON ONE MACHINE FOR YOUR LABELLING NEEDS

The ICP 300 is an ultra-compact, lightweight portable thermal printer with an easy-load paper feature.

WinPOS system. Co., ltd. WP-K837 series. Esc/POS Command specifications Ver.0.94

Additional Functions. User s Guide

326 Printer. User Manual

Nexa PX700IIS Thermal Receipt Printer. User Manual. P a g e 1

STIMA CLS Designed specifically with the ticketing industry in mind.

CS 112 Introduction to Computing II. Wayne Snyder Computer Science Department Boston University

Command Manual SRP-350 Thermal Printer Rev. 1.01

Services. Marco Ronchetti Università degli Studi di Trento

KS Emulation Programmer s Reference Manual

Codesoft 6 Premier Overview Manual. Thermocode Series 2 (all Printers)

Programmer s Reference Manual for EGL, an Eltron EPL Printer Protocol Interpreter

PT330/PT331. Windows Driver User s Guide

PP Thermal Printer. User Manual. Infinite Peripherals, Inc. PP-60 User Manual v1.00

The Basis of Data. Steven R. Bagley

PERFECT LABELING SOLUTIONS. WIDEST RANGE OF MEDIA.

1. What are the key components of Android Architecture? 2. What are the advantages of having an emulator within the Android environment?

Building Applications with ArcGIS Runtime SDK for Android Part II. Will Crick Dan O Neill

Windows Driver User s Manual

Overview. Android Apps (Partner s App) Other Partner s App Platform. Samsung Health. Server SDK. Samsung Health. Samsung Health Server

Revision 1.0.0, 5/30/14

Mini mobile receipt printer

Standard Features. Optional Features

32. And this is an example on how to retrieve the messages received through NFC.

Services Broadcast Receivers Permissions

Using the "B" Switch to Add Unicode Characters to a QR Bar Code

Transcription:

SunmiPrinter Developer documentation 目录 Introduction... - 2-1 Connect to PrinterService... - 3-1.1 AIDL... - 3-1.2 Virtual Bluetooth... - 12-1.3 JS in HTML... - 15-2 State feedback... - 17-2.1 Print status feedback... - 17-2.2 Command callback feedback... - 18-3 Print parameters Introduction...- 19-3.1. Printer resolution... - 19-3.2. Query whether the printer is available... - 20-3.3. Font description... - 20-3.4. QRCode description... - 20-3.5. Bitmap description... - 20-3.6. Barcode description... - 21-3.7. Charater Set... - 22 - Document update record... - 23 -

Introduction Sunmi V1, P1, T1 built-in thermal printer, allowing App to print directly out of thermal small ticket. There are two kinds of built-in printers for Sunmi products: 80mm wide, with a cutter. Compatible with 58mm, T1 is equipped with such a printer. 58mm wide, without cutter. V1, P1 is equipped with such a printer. App developers can communicate with the built-in thermal printer in three ways: 1. Connect the printer via AIDL 2. Connect the printer via Bluetooth 3. Connect the printer via the JS bridge - 2 -

1 Connect to PrinterService 1.1 AIDL 1.1.1. AIDL Profile AIDL is the abbreviation of the Android Interface Definition language, which is a description language for the Android internal process communication interface, through which we can define the communication interface between processes. AIDL provide packaged common print instruction to facilitate developers to quickly access Sunmi printer also supports Sunmi "ESC / POS " instruction set. 1.1.2. AIDL Usage The establishment of the connection can be divided into the following five steps: 1. Add the AIDL file that came with the resource file in your project: (1) in src to establish woyou.aidlservice.jiuiv5 package (2) to join IWoyouService.aidl, I.aidl2 files. 2. Implement the ServiceConnection in the code class that controls the printing. 3. Call ApplicationContext.bindService () and pass it in the ServiceConnection implementation. Note: bindservice is a non-blocking call, which means that after the completion of the call is not immediately bound successfully, must be serviceconnected prevail. 4. In the ServiceConnection.onServiceConnected () implementation, you will receive an IBinder instance (called Service). Call IWoyouService.Stub.asInterface (service) to convert the parameters to the IWoyouService type. 5. Now you can call the IWoyouService interface defined in the various methods to print. Bind service examples private ServiceConnection connservice = new ServiceConnection() { @Override public onservicedisconnected(componentname name) { Toast.makeText(PrinterTestDemoAct.this, "service disconnected", Toast.LENGTH_LONG).show(); - 3 -

setbuttonenable(false); woyouservice = null; try { Thread.sleep(2000); catch (InterruptedException e) { // TODO Auto-generated catch block e.printstacktrace(); Binding(); @Override public onserviceconnected(componentname name, IBinder service) { woyouservice = IWoyouService.Stub.asInterface(service); setbuttonenable(true); try { serviceversion = woyouservice.getserviceversion(); info.settext("service version :" + serviceversion + "\n"); catch (RemoteException e) { // TODO Auto-generated catch block e.printstacktrace(); ; private Binding(){ Intent intent=new Intent(); intent.setpackage("woyou.aidlservice.jiuiv5"); intent.setaction("woyou.aidlservice.jiuiv5.iwoyouservice"); startservice(intent); bindservice(intent, connservice,context.bind_auto_create); - 4 -

1.1.3. AIDL Interface Introduction After the connection is established via AIDL way print service, you can call IWoyouService common good package print command interface (aidl only connection before calling IWoyouService interface function). Function Description printerinit() Printer initialization Reset the printer's logic program without clearing the cache data, so the unfinished print job will continue after resetting Function Description printerselfchecking() printer(hardware) checking a bill with print_density will be printed. a QRcode will be printed.the result of scanning QRcode should be Thank you for using Citaq printer! Description getprinterserialno() get the printer board serial number string Printer Serial number. null Description getprinterversion() get the printer firmware version number string Printer Firmware Version null getprintedlength(in I callback) - 5 -

Description get Printed Length null Description linewrap(int n, in I callback) paper feed int n :rows force a line break, feed n lines Description sendrawdata(in byte[] data, in I callback) print esc/pos instruction byte[] data :ESC/POS instruction null Description setalignment (int alignment, in I callback) Set Alignment int alignment:0--left, 1--center, 2--right Global method,will impact all the print method. printerinit () can reset it. Description setfontname(string typeface, in I callback) set Font string typeface: Currently only support gh,a monospaced font - 6 -

Global method,will impact all the print method. printerinit () can reset it. Description setfontsize(float fontsize, in I callback) set Font Size Float fontsize Global method,will impact all the print method. printerinit () can reset it. Fontsize is beyond the standard international directive of the printing method, adjust the font size will affect the character width, the number of characters will change each line, so the layout formed by equal width font may be confused Description printtext(string text, in I callback) print Text string text Text width full line of automatic line layout, dissatisfaction with a whole line does not print unless forced to line printtextwithfont(string text, String typeface, float fontsize, in I callback) Description print Text With Font string text string typeface fontsize - 7 -

null printcolumnstext(in String[] colstextarr, in int[] colswidtharr, in int[] colsalign, in I callback) Description print a line string[] colstextarr:columns of text strings int[] colswidtharr:each column of the width of the array, in English characters, each Chinese characters accounted for two English characters, each width is greater than 0 int[] colsalign:column alignment: 0 left, 1 center, 2 right The length of the array of three parameters should be consistent, if the colstext [i] width is greater than colswidth [i], the text wrap Description printbitmap(in Bitmap bitmap, in I callback) print Bitmap bitmap Maximum width of 384 pixels, more than can not print and callback exception function printbarcode(string data, int symbology, int height, int width, int textposition, in I callback) Description print bar code string data :barcode data int symbology :barcode type * 0 -- UPC-A, * 1 -- UPC-E, * 2 -- JAN13(EAN13), - 8 -

* 3 -- JAN8(EAN8), * 4 -- CODE39, * 5 -- ITF, * 6 -- CODABAR, * 7 -- CODE93, * 8 -- CODE128 int height:barcode height, 1 to 255, default 162 int width: Barcode width, 2 to 6, default 2 int textposition: Text position 0 - do not print text, 1 - text above the bar code, 2 - text below the bar code, 3 text above and below the bar code The maximum number of prints for each encoding printqrcode(string data, int modulesize, int errorlevel, in I callback) Description print QRCode string data:qrcode data int modulesize:block size,unit: point, value of 1 to 16 int Errorlevel:QRcode error correction level (0 to 3) 0 -- Error correction levell ( 7%), 1 -- Error correction levelm (15%), 2 -- Error correction levelq (25%), 3 -- Error correction levelh (30%) null Description printoriginaltext (String text, in I callback) print Original Text string text: print content - 9 -

Print text, text width full line of automatic line layout, dissatisfaction with a whole line does not print unless forced to line Text by vector text width as output, that is, each character is not equal width Description commitprint(in TransBean[] transbean, in I callback) lib package transaction printing dedicated interface TransBean[] transbean: Print the task list A user using lib calls this interface to open transaction printing Description commitprinterbuffer() print the contents of the buffer event print Description enterprinterbuffer(in boolean clean) Enter the buffer mode boolean clean: Whether to clear the contents of the buffer true clear false not clear event print all calls will be cached, call commitprinterbuffe () Print Description exitprinterbuffer(in boolean commit) exit the buffer mode - 10 -

boolean commit:whether to print out the contents of the buffer true print false not print event print Description cutpaper(in I callback) cut Paper null Description getcutpapertimes() get Cut Paper Times int :cut times null Description opendrawer(in I callback) Open Drawer null Description getopendrawertimes() get Open Drawer Times null - 11 -

1.2 Virtual Bluetooth 1.2.1 Virtual Bluetooth Profile There is a permanent equipment named InnerPrinter In Bluetooth equipment list of V1, which has already been matched. It is a virtual Bluetooth equipment and actually it is build-in. However it can be taking as a normal Bluetooth equipment by using ESC/POS protocol. The purpose is to allow developer who has already developed APP for Bluetooth printer to implement the equipment easily. Some of which belong to special instructions sunmi custom instructions such as: opendrawer cutpaper(all cut) cutpaper(keep a little at left that don't cut) byte[5]:0x10 0x14 0x00 0x00 0x00 byte[4]:0x1d 0x56 0x42 0x00 byte[4]:0x1d 0x56 0x41 0x00 1.2.2 Virtual Bluetooth Usage The step to use InnerPrinter virtual printer : 1.Connect 'InnerPrinter' 2.Convert command and content into bytes 3.Send the bytes to InnerPrinter 4.Driver will printer the content Regarding to 'How to connect InnerPrinter', Google has introduced how to connect Bluetooth equipment in Android Developer Guide. For your convenience and better understanding, we will give the example codes of how to make a connection. Tools BluetoothUtil, the standard Bluetooth connectivity tool class public class BluetoothUtil { private static final UUID PRINTER_UUID = UUID.fromString("00001101-0000-1000-8000-00805F9B34FB"); private static final String Innerprinter_Address = "00:11:22:33:44:55"; public static BluetoothAdapter getbtadapter() { return BluetoothAdapter.getDefaultAdapter(); - 12 -

public static BluetoothDevice getdevice(bluetoothadapter bluetoothadapter) { BluetoothDevice innerprinter_device = null; Set<BluetoothDevice> devices = bluetoothadapter.getbondeddevices(); for (BluetoothDevice device : devices) { if (device.getaddress().equals(innerprinter_address)) { innerprinter_device = device; break; return innerprinter_device; public static BluetoothSocket getsocket(bluetoothdevice device) throws IOException { BluetoothSocket socket = device.createrfcommsockettoservicerecord(printer_uuid); socket.connect(); return socket; public static senddata(byte[] bytes, BluetoothSocket socket) throws IOException { OutputStream out = socket.getoutputstream(); out.write(bytes, 0, bytes.length); out.close(); ------------------------------------------------------------------------------------- Bluetooth connection print service example // 1: Get BluetoothAdapter - 13 -

BluetoothAdapter btadapter = BluetoothUtil.getBTAdapter(); if (btadapter == null) { Toast.makeText(getBaseContext(),"Please Open Bluetooth!", Toast.LENGTH_LONG).show(); return; // 2: Get Sunmi's InnerPrinter BluetoothDevice BluetoothDevice device = BluetoothUtil.getDevice(btAdapter); if (device == null) { Toast.makeText(getBaseContext(),"Please Make Sure Bluetooth have InnterPrinter!", Toast.LENGTH_LONG).show(); return; // 3: Generate a order data, user add data here byte[] data = null; // 4: Using InnerPrinter print data BluetoothSocket socket = null; socket = BluetoothUtil.getSocket(device); BluetoothUtil.sendData(data, socket); Note: need to add a Bluetooth permission statement to the App project to use the Bluetooth device. <manifest> <uses-permission android:name="android.permission.bluetooth"></usespermission> <uses-permission android:name="android.permission.bluetooth_admin"></uses-permission> </manifest> - 14 -

1.3 JS in HTML 1.3.1 JS Profile Calling the printer through the JS is essentially through the JS bridge in the operation of the HTML android native code to print, through the Bluetooth print or AIDL way to achieve printing. (Sunmi printer itself is not a network printer, web applications can not communicate directly with the printer, you need to accept data on the android applications) 1.3.1 HTML Usage The following is a specific call flow: 1. In the definition of HTML android to use the method. Document.getElementsByTagName ('a') [0].addEventListener ('click', function () { Var a = "wellcome to sunmi"; Javascript: lee.funandroid (a); Return false, False); 2. Initialize WebView. WebView mwebview = (WebView) findviewbyid (R.id.wv_view); // Set the encoding MWebView.getSettings (). SetDefaultTextEncodingName ("utf-8"); // Support js MWebView.getSettings (). SetJavaScriptEnabled (true); MWebView.setWebChromeClient (new WebChromeClient ()); Initialize the print service Intent intent = new Intent (); Intention.setPackage ("woyou.aidlservice.jiuiv5"); Intent.setAction ("woyou.aidlservice.jiuiv5.iwooyservice"); StartService (intent); // Start printer service BindService (intent, connservice, Context.BIND_AUTO_CREATE); 3. To add a listener to the WebView, call the WebView.addJavascriptInterface (new JsObject (), 'lee') in the onpagefinished callback method; in the JsObject class, define - 15 -

the method to be manipulated in the HTML by @JavascriptInterface, by calling AIDL Print a small ticket. mwebview.setwebviewclient (new WebViewClientDemo ()); // add a listener corresponding page class Class WebViewClientDemo extends WebViewClient { @Override Public boolean shouldoverrideurlloading (WebView view, String url) { // When you open a new link, use the current WebView, the system does not use a different browser View.loadUrl (url); Return true; @Override Public onpagefinished (WebView view, String url) { Super.onPageFinished (view, url); / ** * Register JavascriptInterface, where "lee" easily take the name, if you use the "lee", then in html as long as lee. Method name () * Of the same name can be called MyJavascriptInterface methods, parameters, but also consistent * / MWebView.addJavascriptInterface (new JsObject (), "lee"); Class JsObject { @JavascriptInterface Public funandroid (final String i) { Toast.makeText (getapplicationcontext (), "calling the local method funandroid by JS." + I, Toast.LENGTH_SHORT).show (); Try { WoyouService.printerSelfChecking (callback); // Using AIDL to print something. Catch (RemoteException e) { - 16 -

E.printStackTrace (); 4. Load the HTML file, click on the button in the HTML when it will print a small ticket // Load the html contains js MWebView.loadData ("", "text / html", null); mwebview.loadurl ( "file: ///android_asset/test.html") ; // This is the page where your //business html 2 State feedback 2.1 Print status feedback Through the form of broadcasting The user needs to set up a broadcast receiver to listen to the broadcast. // Exception out of paper Public final static String OUT_OF_PAPER_ACTION = "woyou.aidlservice.jiuv5.out_of_paper_action"; // Print error Public final static String ERROR_ACTION = "woyou.aidlservice.jiuv5.error_action"; // Print Public final static String NORMAL_ACTION = "woyou.aidlservice.jiuv5.normal_action"; // Open the lid Public final static String COVER_OPEN_ACTION = "woyou.aidlservice.jiuv5.cover_open_action"; // Close the lid abnormalities Public final static String COVER_ERROR_ACTION = "woyou.aidlservice.jiuv5.cover_error_action"; - 17 -

// Exception 1- Kartchner cutter knife Public final static String KNIFE_ERROR_1_ACTION = "woyou.aidlservice.jiuv5.knife_error_action_1"; // Cutter knife repair abnormal 2- Public final static String KNIFE_ERROR_2_ACTION = "woyou.aidlservice.jiuv5.knife_error_action_2"; // Print head is overheated exception Public final static String OVER_HEATING_ACITON = "woyou.aidlservice.jiuv5.over_heating_aciton"; // Printer firmware upgrade start Public final static String FIRMWARE_UPDATING_ACITON = "woyou.aidlservice.jiuv5.firmware_updating_aciton"; 2.2 Command callback feedback Interface method callback provide 3 feedback results: Feedback function return onrunresult return Instruction execution result boolean issuccess true executed successfully, false fails onreturnstring Instruction execution result result: Results final String result result: Results onraiseexception abnormal information int code, String msg public static final int UNSUPPORT = -1; public static final String UNSUPPORT_MSG = "command is not code: exception code support,index #"; //#NO.#byte error msg: exception description public static final int UNSUPPORTENCODING = -2; public static final String UNSUPPORTUNSUPPORTENCODING_MSG = "# encoding is not support"; public static final int ADDTASKFAILED = -3; public static final String ADDTASKFAILED_MSG = "oops,add task failed (the buffer of the task queue is 10M),please try later"; public static final int CODEFAILED = -4; public static final String CODEFAILED_MSG = "create command failed"; - 18 -

public static final int IllegalParameter = -5; public static final String IllegalParameter_MSG = "Illegal parameter"; 3 Print parameters Introduction 58mm 48mm 48mm 384dots Paper width 58mm Effective print width 48mm Pixel 384 Note: Sunmi printer supports 58mm, 80mm printing paper, this document to 58mm paper as a case to illustrate the printer support parameters, 80mm print paper specifications similar. A 58 print paper width of 58mm, effective print width of 48mm. Valid print width of a line of 384 pixels. V1 paper slot depth of 40mm, can put up to 40mm diameter paper, you can print 57 * 40mm 3.1. Printer resolution The printer resolution is 205DPI, the formula is as follows DPI = 384 dots / 48 mm = 8 dots / 1 mm = 205 dots / in = 205-19 -

3.2. Query whether the printer is available T1 equipment is divided into printer hardware and no printer hardware two versions, the user can query the interface from the printer to determine the software. Only for T1 device users interface Settings.Global.getInt(getContentResolver(), "hasprinter", 0); return Type int content: 0 NoPrinter 1 Has a Printer -1 Being queried 3.3. Font description The default font 24, the Chinese 24 * 24 matrix, the English is 12 * 24 matrix. 3.4. QRCode description Sunmi printer prints two-dimensional code, each two-dimensional code block is 4 pixels (less than 4 sweep resolution not). Maximum support version19 (93 * 93) mode. 3.5. Bitmap description Sunmi printer supports maximum print size of 1M, the maximum support width of 384 pixels. If you need to print more than 1M or more than 384 pixels wide, you need to manually compress the picture. if( mbitmap == null ){ /****1M*****/ mbitmap = BitmapFactory.decodeResource(getResources(), R.raw.sunmi); - 20 -

/****over1m***********/ mbitmap1 = BitmapFactory.decodeResource(getResources(), R.raw.sunmi1); /***************/ double gh=(double)mbitmap.getwidth()/384; if( mbitmap1 == null ){ mbitmap2 = BitmapUtils.zoomBitmap(mBitmap1, 384, (int)(mbitmap.getheight()/gh)); /***************/ try { woyouservice.setalignment(1, callback); woyouservice.printbitmap(mbitmap, callback); // woyouservice.printbitmap(mbitmap2, callback); woyouservice.linewrap(3, null); catch (RemoteException e) { // TODO Auto-generated catch block e.printstacktrace(); 3.6. Barcode description Code39 prints up to 13 digits Code93 prints up to 17 digits Code128 prints up to 15 digits Ean8 8digits Ean13 13digits ITF must be even Codebar prints up to 18 digits - 21 -

3.7. Charater Set By default, V1's multibyte(fit east asia etc) is on and the default charracter set is simple chinese. command list and parameter listed below: close multibyte(single byte fit for europe area):0x1c 0x2E open multibyte(fit for east asia) :0x1C 0x26 Set Single byte character set:0x1b 0x74 [parameter] Single byte character set parameter list: [para] [character set] [area] 0 "CP437"; 2 "CP850"; 3 "CP860"; 4 "CP863"; 5 "CP865"; 13 "CP857"; 14 "CP737"; 15 "CP928"; 16 "Windows-1252"; 17 "CP866"; 18 "CP852"; 19 "CP858"; 21 "CP874"; 33 "Windows-775"; 34 "CP855"; 36 "CP862"; 37 "CP864"; 254 "CP855"; Set multibyte character set:1c 43 [parameter] - 22 -

multibyte character set parameter list: [para] [character set] 0x00 0x48 "GB18030"; //0x01 0x49 "BIG5"; 0x02 0x50 "KSC5601"; (byte) 0xff "utf-8"; Document update record Document update content version 1.0.0 Original copy 1.1.170301 add: Print the specification of the picture add: Yes/No Printer Hardware Query Interface Description 1.1.130315 add: aidl cutter Interface add: aidl open till Interface add: aidl Get cutter frequency interfaces Increase: aidl Being open till the number of interfaces Corresponding print service version date 2017/3/1 2017/3/15 1.1.13.329 add:charater set info 2017/3/16 1.1.13.411 Fix: barcode descriptor 2017/4/11-23 -

- 24 -