<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://sdkwiki.wizarpos.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zzy+nouse</id>
	<title>wizarPOS - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://sdkwiki.wizarpos.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zzy+nouse"/>
	<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Special:Contributions/Zzy_nouse"/>
	<updated>2026-05-02T21:34:24Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.5</generator>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=352</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=352"/>
		<updated>2018-04-20T10:00:24Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
==== Zxing ====&lt;br /&gt;
ZXing refer to short for Zebra Crossing. It is implement in the Barcode Scanner (application) that is an Android app.You can visit the website of Barcode Scanner or download the project from Google&lt;br /&gt;
&lt;br /&gt;
==== Zbar ====&lt;br /&gt;
ZBar is an open-source C barcode reading library with C++, Python, Perl, and Ruby bindings. It is also implemented on Linux and Microsoft Windows as a command-line application, and as an iPhone application&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Camera_info_for_different_type_POS&amp;diff=351</id>
		<title>Camera info for different type POS</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Camera_info_for_different_type_POS&amp;diff=351"/>
		<updated>2018-04-20T09:59:27Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: Created page with &amp;quot;different POS, different camera  ===== W1 ===== ===== Q1 ===== ===== Q2/K2 ===== ===== M2 =====&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;different POS, different camera &lt;br /&gt;
===== W1 =====&lt;br /&gt;
===== Q1 =====&lt;br /&gt;
===== Q2/K2 =====&lt;br /&gt;
===== M2 =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=349</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=349"/>
		<updated>2018-04-20T09:48:38Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
===== Zxing =====&lt;br /&gt;
ZXing refer to short for Zebra Crossing. It is implement in the Barcode Scanner (application) that is an Android app.You can visit the website of Barcode Scanner or download the project from Google&lt;br /&gt;
&lt;br /&gt;
===== Zbar =====&lt;br /&gt;
ZBar is an open-source C barcode reading library with C++, Python, Perl, and Ruby bindings. It is also implemented on Linux and Microsoft Windows as a command-line application, and as an iPhone application&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=348</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=348"/>
		<updated>2018-04-20T09:26:52Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Zbar */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
===== Zxing =====&lt;br /&gt;
ZXing refer to short for Zebra Crossing. It is implement in the Barcode Scanner (application) that is an Android app.You can visit the website of Barcode Scanner or download the project from Google&lt;br /&gt;
&lt;br /&gt;
===== Zbar =====&lt;br /&gt;
ZBar is an open-source C barcode reading library with C++, Python, Perl, and Ruby bindings.[2][3] It is also implemented on Linux and Microsoft Windows as a command-line application,[4] and as an iPhone application&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=347</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=347"/>
		<updated>2018-04-20T09:25:08Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Zxing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
===== Zxing =====&lt;br /&gt;
ZXing refer to short for Zebra Crossing. It is implement in the Barcode Scanner (application) that is an Android app.You can visit the website of Barcode Scanner or download the project from Google&lt;br /&gt;
&lt;br /&gt;
===== Zbar =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=346</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=346"/>
		<updated>2018-04-20T09:17:42Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Zxing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
===== Zxing =====&lt;br /&gt;
ZXing refer to short for Zebra Crossing. It imcom&lt;br /&gt;
&lt;br /&gt;
===== Zbar =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=345</id>
		<title>Developed by zxing,zbar</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_zxing,zbar&amp;diff=345"/>
		<updated>2018-04-20T09:15:34Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: Created page with &amp;quot;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded.  ===== Zxing =====  ===== Zbar =====&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Zxing and Zbar are both open-source to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded. &lt;br /&gt;
===== Zxing ===== &lt;br /&gt;
===== Zbar =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=344</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=344"/>
		<updated>2018-04-20T08:43:12Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，allows an Android device with imaging hardware (camera) to scan barcodes or 2-D &amp;quot;graphical barcodes&amp;quot; and retrieve the data encoded  .Information encoded often includes web addresses, geographical coordinates, and small pieces of text, in addition to commercial product codes. The Android-based system is given similar functionality to a hardware barcode reader.&lt;br /&gt;
&lt;br /&gt;
This application supports many different types of barcode, including those used to identify products in commerce. The Barcode Scanner can automatically search the Web to identify a product with a barcode and use, for example, price-comparison information.&lt;br /&gt;
&lt;br /&gt;
The application can decode several 2-D codes including the widely-used QR and Data Matrix codes. QR codes are often embedded in websites; Barcode Scanner can open a browser at the encoded site, for example, facilitating the download of an application.&lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Success&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The scan UI fully display&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -1 || The service has been occupied&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -2 || Can not open the camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Scan timeout&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Illegal parameter&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Getting Started ====&lt;br /&gt;
The scan service use AIDL, so the third app must include the AIDL files which provided by WizarPOS.&lt;br /&gt;
===== Bind service =====&lt;br /&gt;
Sample code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
AidlController.getInstance().startScanService(this, this);&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
private IScannService scanService; //Scanner service&lt;br /&gt;
private ServiceConnection scanConn;&lt;br /&gt;
@Override&lt;br /&gt;
public void serviceConnected(Object objService, ServiceConnection connection) {&lt;br /&gt;
if(objService instanceof IScannService){&lt;br /&gt;
scanService = (IScannService) objService;&lt;br /&gt;
scanConn = connection;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
if(scanService != null){&lt;br /&gt;
this.unbindService(scanConn);&lt;br /&gt;
scanService = null;&lt;br /&gt;
scanConn = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Appendix ====&lt;br /&gt;
===== Barcode Format =====&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
ScanParameter parameter = new ScanParameter();&lt;br /&gt;
parameter.set(ScanParameter.KEY_DECODEFORMAT, &amp;quot; SymbologyType_Aztec, ITF &amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
compound barcode format&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_ALL&lt;br /&gt;
| Includes all the barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_1D || Includes all the 1D barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_2D || Includes all the 2D barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Barcode format&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| AZTEC || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| DATAMATRIX || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| QR || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| MAXICODE || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| PDF417 || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODABAR || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE39 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE93 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE128 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| EAN8 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| EAN13 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ITF || 1D barcode(Interleaved Two of Five)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| RSS_14 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| RSS_EXPANDED || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| UPCA || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| UPCE || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE11 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=342</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=342"/>
		<updated>2018-04-20T08:29:54Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Barcode Format */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Success&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The scan UI fully display&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -1 || The service has been occupied&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -2 || Can not open the camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Scan timeout&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Illegal parameter&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Getting Started ====&lt;br /&gt;
The scan service use AIDL, so the third app must include the AIDL files which provided by WizarPOS.&lt;br /&gt;
===== Bind service =====&lt;br /&gt;
Sample code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
AidlController.getInstance().startScanService(this, this);&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
private IScannService scanService; //Scanner service&lt;br /&gt;
private ServiceConnection scanConn;&lt;br /&gt;
@Override&lt;br /&gt;
public void serviceConnected(Object objService, ServiceConnection connection) {&lt;br /&gt;
if(objService instanceof IScannService){&lt;br /&gt;
scanService = (IScannService) objService;&lt;br /&gt;
scanConn = connection;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
if(scanService != null){&lt;br /&gt;
this.unbindService(scanConn);&lt;br /&gt;
scanService = null;&lt;br /&gt;
scanConn = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Appendix ====&lt;br /&gt;
===== Barcode Format =====&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
ScanParameter parameter = new ScanParameter();&lt;br /&gt;
parameter.set(ScanParameter.KEY_DECODEFORMAT, &amp;quot; SymbologyType_Aztec, ITF &amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
compound barcode format&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_ALL&lt;br /&gt;
| Includes all the barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_1D || Includes all the 1D barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| BARCODE_2D || Includes all the 2D barcodes in the table&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Barcode format&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| AZTEC || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| DATAMATRIX || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| QR || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| MAXICODE || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| PDF417 || 2D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODABAR || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE39 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE93 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE128 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| EAN8 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| EAN13 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| ITF || 1D barcode(Interleaved Two of Five)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| RSS_14 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| RSS_EXPANDED || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| UPCA || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| UPCE || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| CODE11 || 1D barcode&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=340</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=340"/>
		<updated>2018-04-20T08:23:19Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Success&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The scan UI fully display&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -1 || The service has been occupied&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -2 || Can not open the camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Scan timeout&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Illegal parameter&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Getting Started ====&lt;br /&gt;
The scan service use AIDL, so the third app must include the AIDL files which provided by WizarPOS.&lt;br /&gt;
===== Bind service =====&lt;br /&gt;
Sample code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
AidlController.getInstance().startScanService(this, this);&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
private IScannService scanService; //Scanner service&lt;br /&gt;
private ServiceConnection scanConn;&lt;br /&gt;
@Override&lt;br /&gt;
public void serviceConnected(Object objService, ServiceConnection connection) {&lt;br /&gt;
if(objService instanceof IScannService){&lt;br /&gt;
scanService = (IScannService) objService;&lt;br /&gt;
scanConn = connection;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
if(scanService != null){&lt;br /&gt;
this.unbindService(scanConn);&lt;br /&gt;
scanService = null;&lt;br /&gt;
scanConn = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
==== Appendix ====&lt;br /&gt;
===== Barcode Format =====&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
ScanParameter parameter = new ScanParameter();&lt;br /&gt;
parameter.set(ScanParameter.KEY_DECODEFORMAT, &amp;quot; SymbologyType_Aztec, ITF &amp;quot;);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=339</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=339"/>
		<updated>2018-04-20T08:21:39Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Success&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The scan UI fully display&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -1 || The service has been occupied&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -2 || Can not open the camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Scan timeout&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Illegal parameter&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
==== Getting Started ====&lt;br /&gt;
The scan service use AIDL, so the third app must include the AIDL files which provided by WizarPOS.&lt;br /&gt;
===== Bind service =====&lt;br /&gt;
Sample code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
AidlController.getInstance().startScanService(this, this);&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
private IScannService scanService; //Scanner service&lt;br /&gt;
private ServiceConnection scanConn;&lt;br /&gt;
@Override&lt;br /&gt;
public void serviceConnected(Object objService, ServiceConnection connection) {&lt;br /&gt;
if(objService instanceof IScannService){&lt;br /&gt;
scanService = (IScannService) objService;&lt;br /&gt;
scanConn = connection;&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
.&lt;br /&gt;
.&lt;br /&gt;
if(scanService != null){&lt;br /&gt;
this.unbindService(scanConn);&lt;br /&gt;
scanService = null;&lt;br /&gt;
scanConn = null;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=338</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=338"/>
		<updated>2018-04-20T08:10:56Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Error Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1 || Success&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0 || Cancel&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2 || The scan UI fully display&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -1 || The service has been occupied&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -2 || Can not open the camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Scan timeout&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| -3 || Illegal parameter&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=337</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=337"/>
		<updated>2018-04-20T08:08:47Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
(See also Error Code)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=336</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=336"/>
		<updated>2018-04-20T08:08:23Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Result */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Field &lt;br /&gt;
| Type&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| resultCode || int || &amp;gt;=0: Success&lt;br /&gt;
&amp;lt;0: Failure&lt;br /&gt;
See also Error Code&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| text || String || The text result, return null when error occurred, the format of the text is UTF-8, if need the other format, please get the raw buffer and change by yourself.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| rawBuffer || Byte[] || The raw buffer&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| bitmap || Bitmap || The scanned image, it will return when set the parameter enable_return_image is true.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| barcodeFormat || String || barcodeFormat, see Appendix&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=335</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=335"/>
		<updated>2018-04-20T08:04:49Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=334</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=334"/>
		<updated>2018-04-20T08:04:26Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;big&amp;gt;Sample Code&amp;lt;/big&amp;gt;Sample Code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=333</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=333"/>
		<updated>2018-04-20T08:03:52Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
Sample Code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=332</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=332"/>
		<updated>2018-04-20T08:03:37Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
Sample Code&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;java&amp;quot; line=&#039;line&#039;&amp;gt;&lt;br /&gt;
// open the flash light&lt;br /&gt;
Intent intent = new Intent();&lt;br /&gt;
intent.setAction(ScanParameter.BROADCAST_SET_FLASHLIGHT);&lt;br /&gt;
intent.putExtra(ScanParameter.BROADCAST_VALUE, true);&lt;br /&gt;
sendBroadcast(intent);&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=331</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=331"/>
		<updated>2018-04-20T08:01:57Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=330</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=330"/>
		<updated>2018-04-20T08:01:40Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Camera&amp;lt;/big&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Flash light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;big&amp;gt;Indicator light&amp;lt;/big&amp;gt;:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=329</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=329"/>
		<updated>2018-04-20T08:00:45Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
&lt;br /&gt;
* Camera:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* Flash light:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
* Indicator light:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=328</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=328"/>
		<updated>2018-04-20T07:59:31Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
&lt;br /&gt;
* Camera:&lt;br /&gt;
 # Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
 # Broadcast Key: overlay_config&lt;br /&gt;
 # Value: 0 Fixed camera;1 zoom camera; 2 customer display* camera&lt;br /&gt;
&lt;br /&gt;
* Flash light:&lt;br /&gt;
* Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
* Broadcast Key: overlay_config&lt;br /&gt;
* Value: true opened; false closed&lt;br /&gt;
* Indicator light:&lt;br /&gt;
* &lt;br /&gt;
* Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
* Broadcast Key : overlay_config&lt;br /&gt;
* Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=327</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=327"/>
		<updated>2018-04-20T07:58:07Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
In dialog mode, the scanner UI has drawed by the camera scanner service, the third app don’t need to consider about the UI.&lt;br /&gt;
In overlay mode, the camera scanner service only provide the scanner window, the window will display on top of the third app UI. So the third app can draw the UI by itself, such as the title, the buttons. In this mode, if the app need to switch the camera, the flash light, the indicator light, it must use the broadcast like belows:&lt;br /&gt;
Camera:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setcamera&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
value: 0 Fixed camera;1 zoom camera; 2 customer display camera&lt;br /&gt;
Flash light:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setflashlight&lt;br /&gt;
Broadcast Key: overlay_config&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
Indicator light:&lt;br /&gt;
Broadcast Action : com.wizarpos.scanner.setindicator&lt;br /&gt;
Broadcast Key : overlay_config&lt;br /&gt;
Value: true opened; false closed&lt;br /&gt;
&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=326</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=326"/>
		<updated>2018-04-20T07:56:02Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Description ====&lt;br /&gt;
===== Scan Parameter =====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
===== Scan Mode =====&lt;br /&gt;
===== Scan Result =====&lt;br /&gt;
===== Error Code =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=325</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=325"/>
		<updated>2018-04-20T07:49:40Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Scan Parameter */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Scan Parameter ====&lt;br /&gt;
Scan Parameter is a parameter object, it defines the parameters that need by the scan service.&lt;br /&gt;
method: set(String key, String value)  (Value Not case sensitive)&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Key &lt;br /&gt;
| Value Type&lt;br /&gt;
| Value&lt;br /&gt;
| Description&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_top || int || Default: 0,Range: &amp;gt;0 || The distance to the screen top. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_left || int || Default: 0,Range: &amp;gt;0 || The distance to the screen left. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_width || int || Default: screen width,Range: &amp;gt;0 || Screen width. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| window_height || int || Default: screen ,Range: &amp;gt;0 || Screen hight. Effect in overlaymode.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_scan_section || boolean || Default: true|| False: all the display window is the area for scanner, remove the scanner frame. &lt;br /&gt;
True: customize the area of the scanner, has a scanner frame, the other part is semitransparent, the scanner frame is in center, can adjust the width or the height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_width || int || Default: 300dip,Range: &amp;gt;0 || The width of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_height || int || Default: 300dip,Range: &amp;gt;0 || The height of the scanner frame.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| display_scan_line || String || Default: moving,Range: No/fixed/moving || Display the red line in scanner area.&lt;br /&gt;
NO: Not display&lt;br /&gt;
Fixed: In center&lt;br /&gt;
Moving: Move up and down.(dp)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_flash_icon || boolean || Default(W1|Q1): (T|F) || Whether to display the hover button of controlling the flash.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_switch_icon || boolean || Default: T || Whether to display the hover button of switching camera.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_indicator_light || boolean || Default: F || Whether to display the indicator light button, only supported in Q1.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decodeformat || String || Default: BARCODE_ALL|| Decode format range.Default is BARCODE_ALL,the formats are separated by “,”.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| decoder_mode || int || Default: 2,Range:0-2 || Decode mode:&lt;br /&gt;
0: mode1&lt;br /&gt;
1: mode2&lt;br /&gt;
2: mode3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_return_image || boolean || Default: F || Whether to return the scanned image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| camera_index || int || Default: 0,Range:0-2 || 0: fixed camera.&lt;br /&gt;
1:zomm camera.&lt;br /&gt;
2:customer display camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_out || long (ms) || Default: -1,Range: &amp;gt;0 || &amp;lt;=0:scan forever&lt;br /&gt;
&amp;gt;0:scan with timeout,when timeout, return timeout error, only effected in synchronized interface.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_border_color || int || Default: Color.WHITE || The color of scan border, use Color.argb&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_corner_color || int || Default: Color.argb(0xFF,0x21, 0xDB, 0xD5) || The color of the scan corner&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_section_line_color || int || Default: Color.RED || The color of the scan line&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textSize || int || Default: 15 || The size of the tip text Unit: sp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textColor || int || Default: Color.WHITE || The distance between the tip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_tip_textMargin || int || Default: 30|| The distance between thetip text and the bottom of the screen Unit: dp&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| flash_light_state || boolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| indicator_light_state || iboolean || Default: F || Initial state of indicator light&lt;br /&gt;
true: opened&lt;br /&gt;
false: closed&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_mode || String || Default: dialog || Scanner window mode dialog: activity with specified UI &lt;br /&gt;
overlay:only has scanner window, without UItitles, UI buttons, the scanner window on top of other UI activities&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_camera_exposure || int || Default: 0 || Camera exposure compensation for zoom camera&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| scan_time_limit || int || Default: 50 || The max decode time&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| enable_mirror_scan || boolean || Default: T || Enable mirror scan Default is true, opened&lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=324</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=324"/>
		<updated>2018-04-20T07:48:22Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;br /&gt;
&lt;br /&gt;
==== Scan Parameter ====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=321</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=321"/>
		<updated>2018-04-20T07:16:14Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* stopScan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true / false.&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=320</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=320"/>
		<updated>2018-04-20T07:16:01Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* stopScan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;br /&gt;
&lt;br /&gt;
This interface Stops the continuous scan, and closes  the scan service&#039;s UI.&lt;br /&gt;
&lt;br /&gt;
After stop, other callers can call startScan, or scanBarcode interface.&lt;br /&gt;
&lt;br /&gt;
Return: true or false.&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=319</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=319"/>
		<updated>2018-04-20T07:12:32Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* foundBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
&lt;br /&gt;
foundBarcode is a function of IScanCallBack that is a parameter of previous interface. &lt;br /&gt;
&lt;br /&gt;
The caller can get the Scan Result through this interface. When this interface is called, the scan service is in the pause state, and when the call in returned, then the next scanning  will be continued.&lt;br /&gt;
You can turn off the scan service that is in pause with “stopScan”  that is another interface . &lt;br /&gt;
&lt;br /&gt;
Parameter: ScanResult&lt;br /&gt;
&lt;br /&gt;
Return:Void&lt;br /&gt;
&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=315</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=315"/>
		<updated>2018-04-20T07:05:44Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* startScan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
startScan is an asynchronous call interface and indicating the continuous scanning is started.&lt;br /&gt;
&lt;br /&gt;
After the application calls this interface, the scan service opens the camera defined by the scan parameter and starts the scan. After every single scanning, the results will be returned during the callback. After each callback is done, the next scanning continue to run starts.&lt;br /&gt;
&lt;br /&gt;
Parameter:Scan parameter, IScanCallBack&lt;br /&gt;
&lt;br /&gt;
Return: void&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=314</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=314"/>
		<updated>2018-04-20T07:03:06Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
&lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=313</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=313"/>
		<updated>2018-04-20T07:00:31Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=312</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=312"/>
		<updated>2018-04-20T07:00:19Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=311</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=311"/>
		<updated>2018-04-20T07:00:04Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
Parameter: Scan parameter&lt;br /&gt;
Return: Scan result&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=309</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=309"/>
		<updated>2018-04-20T06:59:04Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* startScan */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=306</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=306"/>
		<updated>2018-04-20T06:49:46Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately.&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=305</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=305"/>
		<updated>2018-04-20T06:49:28Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* scanBarcode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
scanBarcode is a synchronous calling interface. &lt;br /&gt;
After the application calls the interface, the scan service opens the camera defined by the scan parameter and then starts the scan. Once getting the result of scanning, the camera is closes and the results are returned immediately&lt;br /&gt;
&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=304</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=304"/>
		<updated>2018-04-20T06:43:53Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=303</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=303"/>
		<updated>2018-04-20T06:43:33Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=302</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=302"/>
		<updated>2018-04-20T06:43:19Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
==== Introduction ====&lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=301</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=301"/>
		<updated>2018-04-20T06:42:46Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service ，which is an app and started by using AIDL and the third apps custom their UI through by transfer some parameters, provides convenient services that include scaning bar code and getting result of scanning for comsumers.  &lt;br /&gt;
&lt;br /&gt;
 ==== Introduction ==== &lt;br /&gt;
 &lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
==== Interface ====&lt;br /&gt;
===== scanBarcode  =====&lt;br /&gt;
===== startScan =====&lt;br /&gt;
===== foundBarcode =====&lt;br /&gt;
===== stopScan =====&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=297</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=297"/>
		<updated>2018-04-20T06:18:51Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service is an app and started by using AIDL. The third apps custom their UI through by transfer some parameters.&lt;br /&gt;
===== Introduction =====&lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
 For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=296</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=296"/>
		<updated>2018-04-20T06:18:17Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service is an app and started by using AIDL. The third apps custom their UI through by transfer some parameters.&lt;br /&gt;
===== Introduction =====&lt;br /&gt;
 There are many applications are developed based on smart POS. In one thing, many of the Smart POS developers also have POS industry background,but not professional Android developers. So when they start developing applications, they want to be provided with a convenient scan API by WizarPOS, instead of learning Zxing/Zbar themselves.In other thing,from the hardware point of view, the scan parts used on smart POS, are not necessarily the standard camera, there will be some transformation. In some cases, the scan part will be required to be a specialized hardware. Therefore, the direct use of Zxing/Zbar is not really applicable for WizarPOS smart POS, but need some modification and customization.&lt;br /&gt;
For the reasons above, we consider to develop WizarPOS Scan Services to facilitate the third party developers in developing applications with scan function.&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=295</id>
		<title>Developed by scan service</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=Developed_by_scan_service&amp;diff=295"/>
		<updated>2018-04-20T06:04:33Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: Created page with &amp;quot;The scan service is an app and started by using AIDL. The third apps custom their UI through by transfer some parameters.&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The scan service is an app and started by using AIDL. The third apps custom their UI through by transfer some parameters.&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=279</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=279"/>
		<updated>2018-04-18T08:27:51Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC $ nL nH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! (Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! （Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC -  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=278</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=278"/>
		<updated>2018-04-18T08:27:38Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC - n */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! (Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! （Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $ nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC -  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=277</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=277"/>
		<updated>2018-04-18T08:27:30Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC * m nL nH */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! (Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! （Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $ nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC - n ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=276</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=276"/>
		<updated>2018-04-18T08:27:12Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC ! n（Ⅱ） */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! (Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! （Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $ nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC * m nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC - n ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=275</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=275"/>
		<updated>2018-04-18T08:27:05Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC ! n(Ⅰ) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! (Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! n（Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $ nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC * m nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC - n ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
	<entry>
		<id>http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=274</id>
		<title>ESC Commands</title>
		<link rel="alternate" type="text/html" href="http://sdkwiki.wizarpos.com/index.php?title=ESC_Commands&amp;diff=274"/>
		<updated>2018-04-18T08:26:53Z</updated>

		<summary type="html">&lt;p&gt;Zzy nouse: /* ESC SP n */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== ESC Commands==&lt;br /&gt;
&lt;br /&gt;
=== HT ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! HT !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Horizontal tab&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII   HT&lt;br /&gt;
&lt;br /&gt;
Hex	  09&lt;br /&gt;
&lt;br /&gt;
Decimal  9&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Move the print position to the next tab position.&lt;br /&gt;
&lt;br /&gt;
* If no tab position is set (it is default setting), this command will be ignored &lt;br /&gt;
&lt;br /&gt;
* The tab position is set by ESC D&lt;br /&gt;
&lt;br /&gt;
* If the tab position exceeds the print area, printing position will be moved to the starting position of next line (Considering as a line is full, print the data and feed one line).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC D&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== LF ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! LF !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   LF&lt;br /&gt;
&lt;br /&gt;
Hex	   0A&lt;br /&gt;
&lt;br /&gt;
Decimal  10&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer, then feed paper for one line&lt;br /&gt;
&lt;br /&gt;
according to the current line space settings. After printing, the print&lt;br /&gt;
&lt;br /&gt;
position moves to the beginning of the line.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
=== CR ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! CR !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Carriage return&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   CR&lt;br /&gt;
&lt;br /&gt;
Hex	   0D&lt;br /&gt;
&lt;br /&gt;
Decimal  13&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Adjust the print position to the starting position of this line and line&lt;br /&gt;
feed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| LF&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SP  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SP  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the right-side character space&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SP n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 20 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 32 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the right right-side character space is [n×0.125mm]&lt;br /&gt;
* For double width mode, the character right margin is double than normal mode.&lt;br /&gt;
* The command will not effective to Chinese characte&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! n(Ⅰ) ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC ! n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| set the font type &lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC ! n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 21 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the font type (italic, border, bold, double width, double height,&lt;br /&gt;
inverse or underline). And the bit definitions of parameter n are&lt;br /&gt;
shown as follows table&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC -, ESC E, GS !&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC ! n（Ⅱ） ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| Bit &lt;br /&gt;
| On/off&lt;br /&gt;
| Hex&lt;br /&gt;
| Decimal&lt;br /&gt;
| Function  &lt;br /&gt;
|-&lt;br /&gt;
| 0 || off || 00 || 0 || Character type A (12×24)&lt;br /&gt;
|-&lt;br /&gt;
| 0 || on || 01 || 1 || Character type B (9×17)&lt;br /&gt;
|-&lt;br /&gt;
| 4 || off || 00 || 0 || Double-height mode off&lt;br /&gt;
|-&lt;br /&gt;
| 4 || on || 10 || 16 || Double-height mode on&lt;br /&gt;
|-&lt;br /&gt;
| 5 || off || 00 || 0 || Double-width mode off&lt;br /&gt;
|-&lt;br /&gt;
| 5 || on || 20 || 32 || Double-width mode on&lt;br /&gt;
|-&lt;br /&gt;
| 7 || off || 00 || 0 || Underline mode off&lt;br /&gt;
|-&lt;br /&gt;
| 7 || on || 80 || 128 || Underline mode on&lt;br /&gt;
|}&lt;br /&gt;
* If set double-width and double-height at the same time, quadrupled thecharacter size.&lt;br /&gt;
* Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
* The width of under line set by ESC -, have not affected by the character size.&lt;br /&gt;
* ESC M also can set character type.&lt;br /&gt;
* ESC – also can turn on/off underline.&lt;br /&gt;
* GS ! also can set character size.&lt;br /&gt;
&lt;br /&gt;
=== ESC $ nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC $ nL nH !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the absolute print position&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   ESC $ nL nH&lt;br /&gt;
&lt;br /&gt;
Decimal  27 36 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Moves the print position to a location in a distance of (nL + nH × 256) dots from&lt;br /&gt;
the starting position for printing&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC \&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC * m nL nH ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC * m nL nH d1...dk!!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select bit-image mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC * m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2A m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal    27 42 m nL nH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| &lt;br /&gt;
* m = 0,1,32,33&lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤3&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Stores the bit image data in the print buffer using the mode specified&lt;br /&gt;
by bit image mode m, nl and nh specifies a bit image in the horizontal direction&lt;br /&gt;
as(nl+256×nh) dots, [d]k specifies the bit image data (column format)&lt;br /&gt;
k indicates the amount of bit image data, but it does not need to be&lt;br /&gt;
transmitted..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||  &lt;br /&gt;
* If m is out of Parameter Range, the nL and the other data will regard as the normal data.&lt;br /&gt;
* If the bit image exceeds one line of print area, the excess part will be Ignored.&lt;br /&gt;
* Data [d]k specifies a bit printed to 1 and not printed to 0.&lt;br /&gt;
* Bold, double-strike, underline, character size, upside-down, black/white command will not affect to the command.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC - n ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC - n !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn underline mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC - n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 2D n&lt;br /&gt;
&lt;br /&gt;
Decimal   27 45 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turns underline mode on or off using n as follows&lt;br /&gt;
* if n= 0 or 48, Turns off underline mode&lt;br /&gt;
* if n=1 or 49, Turns on underline mode (1-dot thick)&lt;br /&gt;
* if n=2 or 50, Turns on underline mode (2-dots thick)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
   Can not underline the blank generated by HT or the rotate 90 character.&lt;br /&gt;
   Default width is 1-dot thick.&lt;br /&gt;
   The thick is not affected by the character size.&lt;br /&gt;
   ESC ! can also turn on/off underline.&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 2 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 2 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to a default value 3mm&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC 2&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 32&lt;br /&gt;
&lt;br /&gt;
Decimal  27 50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the line space to a default value 3mm(24×0.125mm)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC 3 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC 3 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the line space to n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC 3 n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 33 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 51 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| ASet the line space to n dots&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=24&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC SO ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC SO !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn on double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC SO n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 0E n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 14 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn on double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Use LF or ESC DC4 to turn off&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC DC4 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC DC4 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn off double width mode&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC DC4 n&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 14 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 20 n&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn off double width mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=2&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The value of n is same with the n in turn on command&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC @ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC @ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Initialize the printer&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC @&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 40&lt;br /&gt;
&lt;br /&gt;
Decimal  27 64&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Reset the printer, the print mode reset to the default setting&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Can not clear the data in receive buffer&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the left margin&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	 ESC B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 42 n &lt;br /&gt;
&lt;br /&gt;
Decimal   27 66 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter Range|| 0≤n≤47&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Set the left margin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| This command just affects the character, doesn’t affect the Chinese&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC D ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC D !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set horizontal tab positions&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC D n1...nk NUL&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 44 n1...nk 00&lt;br /&gt;
&lt;br /&gt;
Decimal  27 68  n1...nk 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range ||&lt;br /&gt;
* 1≤n≤255&lt;br /&gt;
* 0≤k≤32&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Set the horizontal tab positions, the meanings of parameters are as follows:&lt;br /&gt;
n1..nk are horizontal tab position (Unit: 8 dots), NULL is a stop character&lt;br /&gt;
|-&lt;br /&gt;
| Note|| &lt;br /&gt;
# Horizontal tab position stored as a data, the data value is [character width×n] measured from the line begin.&lt;br /&gt;
# When this command is used, any previous horizontal tab settings will be canceled.&lt;br /&gt;
# The tab position can be switched by HT command&lt;br /&gt;
# The max set value is 32(k=32), larger than 32, the larger data will regard as normal data.&lt;br /&gt;
# Transmit [d]k in ascending order and place a NULL code at the end.&lt;br /&gt;
# When dk is less than or equal to dk-1, horizontal tab setting is finished, and the following data will be processed as normal data.&lt;br /&gt;
# ESC D NUL will cancel the horizontal tab position.&lt;br /&gt;
# Even the character width change, the set tab position will not change.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Defualt|| Default tab position is character type A(12×24), the eight character space&lt;br /&gt;
(column 9,17,25 ...)&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| HT&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn bold mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Descriptiopn|| Turns bold mode on or off using n as follows:&lt;br /&gt;
If n = 0, turn off the bold, if n = 1, turn on the bold.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n = 0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC J ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC J !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n dots&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC J n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4A n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 74 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print the data in the printer buffer and feed paper for n dots(0.125mm per&lt;br /&gt;
dot)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* This has not affected the set value by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC G ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC G !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC G n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 47  n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 71 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn double-strike mode on/off:&lt;br /&gt;
* 0: turn off double-strike&lt;br /&gt;
* 1: turn on double-strike。&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The double-strike has the same print with bold print&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC E&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC M ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC M !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select the character type&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC M n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 4D n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 77 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Select character type:&lt;br /&gt;
If n=0 or 48,Character type A (12×24)&lt;br /&gt;
If n=1 or 49,Character type B (9×17)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC!&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC R ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC R !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select international character&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC R n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 52 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 82 n &lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255  &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an international character set n as follows::&lt;br /&gt;
* n=0 refer to U.S.A&lt;br /&gt;
* n=1 refer to France&lt;br /&gt;
* n=2 refer to Germany&lt;br /&gt;
* n=3 refer to U.K.&lt;br /&gt;
* n=4 refer to Denmark I&lt;br /&gt;
* n=5 refer to Sweden&lt;br /&gt;
* n=6 refer to Italy&lt;br /&gt;
* n=7 refer to Spain I&lt;br /&gt;
* n=8 refer to Japan&lt;br /&gt;
* n=9 refer to Norway&lt;br /&gt;
* n=10 refer to Denmark II&lt;br /&gt;
* n=11 refer to refer to Spain II&lt;br /&gt;
* n=12 refer to Latin America&lt;br /&gt;
* n=13 refer to Korea&lt;br /&gt;
* n=14 refer to Slovenia/Croatia&lt;br /&gt;
* n=15 refer to China&lt;br /&gt;
* n=16 refer to Vietnam&lt;br /&gt;
* n=17 refer to Arabia&lt;br /&gt;
* n=101 refer to ISO-8859-1&lt;br /&gt;
* n=102 refer to ISO-8859-2&lt;br /&gt;
* n=103 refer to ISO-8859-3&lt;br /&gt;
* n=104 refer to ISO-8859-4&lt;br /&gt;
* n=105 refer to ISO-8859-5&lt;br /&gt;
* n=107 refer to ISO-8859-7&lt;br /&gt;
* n=109 refer to ISO-8859-9&lt;br /&gt;
* n=113 refer to ISO-8859-13&lt;br /&gt;
* n=115 refer to ISO-8859-15&lt;br /&gt;
* n=130 refer to GB13030-2000&lt;br /&gt;
|-&lt;br /&gt;
| Default || n=0(Suggest to use n &amp;gt;100)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn 90° clockwise rotation mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  ESC V n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 56 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 86 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n = 0,1,48,49&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Turn 90° clockwise rotation mode on/off using n as follows:&lt;br /&gt;
* If n=0 or 48, Turns off 90°clockwise rotation mode&lt;br /&gt;
* If n=1 or 49, Turns  on 90°clockwise rotation mode&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| Underline is not effective for the rotation characters&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !，ESC -&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC \ ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC \ !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC \ nL nH&lt;br /&gt;
&lt;br /&gt;
Hex	   1B 5C nL nH &lt;br /&gt;
&lt;br /&gt;
Decimal  27 92 nL nH&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤nL≤255&lt;br /&gt;
* 0≤nH≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description || Moves the print position to a location in a distance of (nL + nH × 256) dots from the current position&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If the position is not in print area, the set will be ignored.&lt;br /&gt;
* If the set position is in right of the current position, the distance N is nL+nH ×256=N&lt;br /&gt;
* If the set position is in left of the current position, the distance N is: nL+nH×256=65536-N&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC $&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC a ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC a !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set the print alignment mode(left, center or right)&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC a n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 61 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 97 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| n=0,1,2,48,49,50&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Align all data in a line, the meanings of n value are as follows:&lt;br /&gt;
* If n = 0,48, mode is left &lt;br /&gt;
* If n = 1,49, mode is center &lt;br /&gt;
* If n = 2,50, mode is right &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note|| The settings by this command are effective at the line begin&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC d ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC d !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print and feed paper for n lines&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC d n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 64 n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 100 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print the data in the printer buffer and feed paper for n lines&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* After printing, the print position moves to the beginning of the line.&lt;br /&gt;
* The line space is set by ESC 2 or ESC 3.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC t ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC t !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Select character code table&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC t n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 74 n&lt;br /&gt;
&lt;br /&gt;
Decimal  27 116 n&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range || 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Selects an code n from the character code table as follows:&lt;br /&gt;
n   Character code table&lt;br /&gt;
0 PC437: USA, Standard Europe&lt;br /&gt;
1 Katakana&lt;br /&gt;
2 PC850: Multilingual&lt;br /&gt;
3 PC860: Portuguese&lt;br /&gt;
4 PC863: Canadian-French&lt;br /&gt;
5 PC865: Nordic&lt;br /&gt;
11 PC851: Greek&lt;br /&gt;
12 PC853: Turkish&lt;br /&gt;
13 PC857: Turkish&lt;br /&gt;
14 PC737: Greek&lt;br /&gt;
15 ISO8859-7: Greek&lt;br /&gt;
16 WPC1252&lt;br /&gt;
17 PC866: Cyrillic #2&lt;br /&gt;
18 PC852: Latin2&lt;br /&gt;
19 PC858: Euro&lt;br /&gt;
20 KU42: Thai&lt;br /&gt;
21 TIS11: Thai&lt;br /&gt;
26 TIS18: Thai&lt;br /&gt;
30 TCVN-3: Vietnamese I&lt;br /&gt;
31 TCVN-3: Vietnamese II&lt;br /&gt;
32 PC720: Arabic&lt;br /&gt;
33 WPC775: Baltic Rim&lt;br /&gt;
34 PC855: Cylillic&lt;br /&gt;
35 PC861: Icelandic&lt;br /&gt;
36 PC862: Hebrew&lt;br /&gt;
37 PC864: Arabic&lt;br /&gt;
38 PC869: Greek&lt;br /&gt;
39 ISO8859-2: Latin2&lt;br /&gt;
40 ISO8859-15: Latin9&lt;br /&gt;
41 PC1098: Farsi&lt;br /&gt;
42 PC1118: Lithuanian&lt;br /&gt;
43 PC1119: Lithuanian&lt;br /&gt;
44 PC1125: Ukrainian&lt;br /&gt;
45 WPC1250: Latin 2&lt;br /&gt;
46 WPC1251: Cyrillic&lt;br /&gt;
47 WPC1253: Greek&lt;br /&gt;
48 WPC1254: Turkish&lt;br /&gt;
49 WPC1255: Hebrew&lt;br /&gt;
50 WPC1256: Arabic&lt;br /&gt;
51 WPC1257: Baltic Rim&lt;br /&gt;
52 WPC1258: Vietnamese&lt;br /&gt;
53 KZ1048: Kazakhstan&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=0(Suggest to use ESC R command to replace this command)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
===ESC { ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC { !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn upside-down printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC { n &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 7b n &lt;br /&gt;
&lt;br /&gt;
Decimal  27 123 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||turns upside-down print mode on or off:&lt;br /&gt;
* 0 Upside-down print mode is turned off&lt;br /&gt;
* 1 Upside-down print mode is turned on&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||The settings by this command are effective at the line begin.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS ! ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS ! !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name||Select character size&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS ! n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 21 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 33 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Function description Character height is set by the bit0~bit3 of n, and character&lt;br /&gt;
width is set by bit4~bit7 of n.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* If n is our of range, the command will be ignored.&lt;br /&gt;
* Use ESC ! also can turn on/off double-width and double height&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC !&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS B ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS B !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Turn black/white inverse printing mode on/off&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS B n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 412  n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 66  n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| turns upside-down print mode on or off.&lt;br /&gt;
* 0 Black/white inverse printing mode is turned off&lt;br /&gt;
* 1 Black/white inverse printing mode is turned on&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* Also effective the blank set by ESC SP.&lt;br /&gt;
* Not effective the blank set by HT、ESC $ and ESC \.&lt;br /&gt;
* Not effective the line space.&lt;br /&gt;
* This command prior to the underline mode, but can not cancel the underline mode.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default||n=0&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS v 0 ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS v 0 !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print raster bit image&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  GS v 0 m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Hex	   1D 76 30  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
Decimal  29 118 48  m xL xH yL yH d1...dk&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range||&lt;br /&gt;
* 0≤m≤3&lt;br /&gt;
* 48≤m≤51&lt;br /&gt;
* 0≤xL≤255&lt;br /&gt;
* 0≤xH≤255,1≤(xL+xH×256)≤128&lt;br /&gt;
* 0≤yL≤255&lt;br /&gt;
* 0≤yH≤8,1≤(yL+yH×256)≤4095&lt;br /&gt;
* 0≤d≤255&lt;br /&gt;
* k=(xL+xH×256)×(yL+yH×256)(k&amp;gt;0)&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Print raster bit image, the meanings of parameter m are as follows:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| m || Mode || Vertical dot density ||Horizontal dot density&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0, 48|| Normal ||203.2 dpi || 203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1, 49|| Double width ||203.2 dpi ||101.6 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2, 50|| Double height||101.6 dpi ||203.2 dpi&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|3, 51 ||Double width &amp;amp; double height||101.6 dpi ||101.6 dpi&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||&lt;br /&gt;
* xL, xH specifies (xL + xH × 256) bytes in horizontal direction forthe bit image.&lt;br /&gt;
* yL, yH specifies (yL + yH × 256) dots in vertical direction for the bit image.&lt;br /&gt;
* [d]k specifies the bit image data (raster format). k indicates the number of bit image data. k is an explanation parameter; therefore, it does not need to be transmitted&lt;br /&gt;
* The print mode command will not affect the command.&lt;br /&gt;
* The data out print are will be ignored.&lt;br /&gt;
* The print position can be set by HT, ESC $, ESC \, GS L.&lt;br /&gt;
* ESC a can affect the raster image.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Reference|| ESC 2，ESC 3&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 *  ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!DC2 *  !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 * r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Hex	   12  2A r n d1...dn&lt;br /&gt;
&lt;br /&gt;
Decimal  18 42 r n d1...dn &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| &lt;br /&gt;
* 0≤n≤255&lt;br /&gt;
* 0&amp;lt;r≤255&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the assigned height bitmap.&lt;br /&gt;
* r:height&lt;br /&gt;
* n:width&lt;br /&gt;
* only effective when no data in print buffer&lt;br /&gt;
* the print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 V ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 V !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| MSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 V n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 56 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 86 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the MSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 v ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 v !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| LSB Bitmap print&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	  DC2 v n nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
Hex	   12 76 nL nH d1...d48 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 118 nL nH d1...d48&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0&amp;lt;nL+nH×256&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
* Print the LSB bitmap, the width is 384.&lt;br /&gt;
* The height of the bitmap is nL+nH×256.&lt;br /&gt;
* Only effective when no data in print buffer&lt;br /&gt;
* The print mode command will not affect this bitmap.&lt;br /&gt;
* The data out of print area will be decrypted.&lt;br /&gt;
* Dn is the print data, 1 will print, 0 will not print.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== DC2 T ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! DC2 T !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Print test page&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   DC2 T &lt;br /&gt;
&lt;br /&gt;
Hex	   12 54 &lt;br /&gt;
&lt;br /&gt;
Decimal  18 84 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description||Print test page&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC A ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC A !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check print module version&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC A &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 41&lt;br /&gt;
&lt;br /&gt;
Decimal  27 65&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 32 bytes(char[32])&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== ESC &amp;gt; ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! ESC &amp;gt; !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Check the font library head info&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   ESC &amp;gt; &lt;br /&gt;
&lt;br /&gt;
Hex	   1B 3E &lt;br /&gt;
&lt;br /&gt;
Decimal  27 62&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| Send the check command, then read the return value. The return value is 128 bytes.&lt;br /&gt;
* char magic[8];&lt;br /&gt;
* int version;&lt;br /&gt;
* int size;&lt;br /&gt;
* int offset;&lt;br /&gt;
* char md5[16]&lt;br /&gt;
* char time[24];&lt;br /&gt;
* char reserve[2];&lt;br /&gt;
* char describe[64];&lt;br /&gt;
* char unuse;&lt;br /&gt;
* char checksum&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=== GS E ===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! GS E !!  &lt;br /&gt;
|-&lt;br /&gt;
| Name|| Set print density&lt;br /&gt;
|-&lt;br /&gt;
| Format|| ASCII	   GS E n &lt;br /&gt;
&lt;br /&gt;
Hex	   1D 45 n &lt;br /&gt;
&lt;br /&gt;
Decimal  29 69 n &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Parameter range|| 0≤n≤3&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Description|| &lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| n || description &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 0|| lighter &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 1|| light &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 2|| dark&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| 3|| darker&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Note||This setting will effect all the time until power off the printer or reset the&lt;br /&gt;
command&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| Default|| n=1&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Zzy nouse</name></author>
	</entry>
</feed>