0% found this document useful (0 votes)
239 views

ePOS SDK Android Um en Revv

Epson ePOS SDK for Android provides functionality for developing POS applications using Epson printers and peripheral devices on Android. It supports various printer models including TM printers, customer displays, and POS terminals. The manual describes the SDK's development environment and operating environment, including supported printers, functions, and devices. It provides instructions on connecting printers, creating projects, and programming with the SDK's APIs. It also lists the available APIs for tasks like printing, status checking, and controlling peripheral devices.

Uploaded by

mkvtesting
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
239 views

ePOS SDK Android Um en Revv

Epson ePOS SDK for Android provides functionality for developing POS applications using Epson printers and peripheral devices on Android. It supports various printer models including TM printers, customer displays, and POS terminals. The manual describes the SDK's development environment and operating environment, including supported printers, functions, and devices. It provides instructions on connecting printers, creating projects, and programming with the SDK's APIs. It also lists the available APIs for tasks like printing, status checking, and controlling peripheral devices.

Uploaded by

mkvtesting
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 688

Epson ePOS SDK for Android

User’s Manual

Functionality

How to Use

API Reference

Device Specifications

Sample Programs

Application Guide

Appendix

M00094421
Rev.V
Precautions
• Unauthorized duplication, copying, reproduction, or modification of any part or all of this document is strictly
prohibited.
• Contents of this manual are subject to change without prior notice. Contact us directly for the most recent
information.
• Every effort is made to ensure that the contents of this manual are without error. Please contact us if any errors
or other issues are found.
• The previous statement notwithstanding, we will not be liable for any negative impact as a result of use.
• Epson shall not be liable for any damages caused as a result of using this product incorrectly, failing to comply
with the content of this document, or having repair or modifications performed by third parties other than
Epson or those specified by Epson.
• Epson shall not be liable for any issues as a result of installing optional parts or consumables that are not gen-
uine Epson parts or parts certified by Epson.

Trademarks
EPSON, EXCEED YOUR VISION, and ESC/POS are registered trademarks of Seiko Epson Corporation.
Android™ is a trademark of Google LLC.
Java™ are trademarks of Oracle Corporation, its subsidiaries, and related companies in the United States and
other countries.
Wi-Fi® is a registered trademark of Wi-Fi Alliance®.
The Bluetooth® word mark and logo is a registered trademark of Bluetooth SIG, Inc. Seiko Epson uses these trade-
marks under the terms of license. Other trademarks and trade names are the property of their respective owners.
QR Code is a registered trademark of Denso Wave Incorporated.
All other trademarks are the property of their respective owners and used for identification purpose only.

ESC/POS® Command System


Epson has embarked on a global initiative by developing ESC/POS, a unique POS printer command system. ESC/
POS contains a wealth of unique commands, many of which are patent-protected. Our system enables the con-
figuration of versatile POS systems with a high level of scalability. In addition to being compatible with most
Epson POS printers and displays, the flexibility provided by this unique control system facilitates ease of future
upgrades. This functionality and convenience of use are appreciated around the world.

© Seiko Epson Corporation 2015-2021.


Safety Precautions

Meaning of Symbols
The following symbols are used in this manual. Make sure to understand the meaning of these symbols before
using the product.

Describes usage precautions that must be observed. Incorrect handling due to the disregard of this informa-
tion may result in product failure or incorrect operation.

Describes additional explanation or other useful information.

Usage Limitations
Please use our products in environments and systems designed with consideration to safety and disaster
recovery such as fail-safe configurations and redundant designs, for example, if this product is used in
applications in which a high level of reliability and safety in functionality and precision is required such as in
aircraft, trains, ships, automobiles and other transportation-related applications or in crime prevention
equipment and safety equipment.
This product is not intended for use in applications that require extremely high levels of reliability and safety
such as in aerospace equipment, trunk-line communications equipment, nuclear power control equipment, and
medical equipment. Consider your usage environment and requirements carefully before using this product in
such applications.

About this Manual

Purpose of this Manual


This manual provides the information necessary to develop applications using Epson ePOS SDK for Android.

Organization of this Manual


This manual is organized into the following chapters.
Chapter 1 Functionality

Chapter 2 How to Use

Chapter 3 API Reference

Chapter 4 Device Specifications

Chapter 5 Sample Programs

Chapter 6 Application Guide

Appendix Open Source Software Licensing

3
Contents
■ Safety Precautions ............................................................................................................... 3
Meaning of Symbols.................................................................................................................................................................................3
■ Usage Limitations ................................................................................................................ 3
■ About this Manual................................................................................................................ 3
Purpose of this Manual............................................................................................................................................................................3
Organization of this Manual ..................................................................................................................................................................3
■ Contents ............................................................................................................................... 4

Functionality ................................................................................12
■ Application Development in Epson ePOS SDK for Android ............................................... 12
TM Printer Models .................................................................................................................................................................................. 13
Customer Display Models.................................................................................................................................................................... 14
TM Printer + DM-D + barcode scanner model ............................................................................................................................. 15
POS Terminal Model .............................................................................................................................................................................. 16
■ Epson ePOS SDK for Android Development Environment ................................................ 17
■ Application Operating Environment.................................................................................. 17
Supported printers................................................................................................................................................................................. 17
Functions provided in each printer.................................................................................................................................................. 19
Controllable Peripheral Devices........................................................................................................................................................ 22
■ Downloadable Content ...................................................................................................... 24
■ Web Content....................................................................................................................... 25
■ Limitations ......................................................................................................................... 25

How to Use ....................................................................................26


■ Printer Connections ........................................................................................................... 26
■ Creating an Epson ePOS SDK for Android Project.............................................................. 26
■ Programming Guide........................................................................................................... 30
Programming Flow ................................................................................................................................................................................ 30
Effective range of command buffers for setting ......................................................................................................................... 36
Status .......................................................................................................................................................................................................... 37

API Reference ...............................................................................38


■ List of ePOS SDK API .......................................................................................................... 38
Printer class............................................................................................................................................................................................... 38
HybridPrinter class ................................................................................................................................................................................. 43
LineDisplay class ..................................................................................................................................................................................... 46
Keyboard class ......................................................................................................................................................................................... 48
POSKeyboard class................................................................................................................................................................................. 49
BarcodeScanner class............................................................................................................................................................................ 49

4
MSR class ................................................................................................................................................................................................... 49
SimpleSerial class ................................................................................................................................................................................... 50
GermanyFiscalElement class .............................................................................................................................................................. 50
OtherPeripheral class ............................................................................................................................................................................ 50
CommBox class ....................................................................................................................................................................................... 51
Common to all classes .......................................................................................................................................................................... 51
Discovery class......................................................................................................................................................................................... 51
Epos2Exception class ............................................................................................................................................................................ 51
Log class..................................................................................................................................................................................................... 52
EasySelect class ....................................................................................................................................................................................... 52
EasySelectInfo class ............................................................................................................................................................................... 52
■ Printer class........................................................................................................................ 53
Printer ......................................................................................................................................................................................................... 53
connect ...................................................................................................................................................................................................... 56
disconnect................................................................................................................................................................................................. 60
startMonitor ............................................................................................................................................................................................. 61
stopMonitor.............................................................................................................................................................................................. 62
getStatus.................................................................................................................................................................................................... 63
sendData.................................................................................................................................................................................................... 66
beginTransaction .................................................................................................................................................................................... 67
endTransaction........................................................................................................................................................................................ 68
requestPrintJobStatus .......................................................................................................................................................................... 69
clearCommandBuffer............................................................................................................................................................................ 70
addTextAlign ............................................................................................................................................................................................ 71
addLineSpace .......................................................................................................................................................................................... 72
addTextRotate ......................................................................................................................................................................................... 73
addText....................................................................................................................................................................................................... 74
addTextLang............................................................................................................................................................................................. 75
addTextFont.............................................................................................................................................................................................. 76
addTextSmooth....................................................................................................................................................................................... 77
addTextSize............................................................................................................................................................................................... 78
addTextStyle............................................................................................................................................................................................. 79
addHPosition............................................................................................................................................................................................ 81
addFeedUnit............................................................................................................................................................................................. 82
addFeedLine............................................................................................................................................................................................. 83
addImage .................................................................................................................................................................................................. 84
addLogo..................................................................................................................................................................................................... 88
addBarcode............................................................................................................................................................................................... 89
addSymbol................................................................................................................................................................................................ 94
addHLine ................................................................................................................................................................................................... 99
addVLineBegin ......................................................................................................................................................................................101
addVLineEnd ..........................................................................................................................................................................................103
addPageBegin........................................................................................................................................................................................104
addPageEnd ...........................................................................................................................................................................................105
addPageArea..........................................................................................................................................................................................106
addPageDirection.................................................................................................................................................................................108
addPagePosition...................................................................................................................................................................................109
addPageLine...........................................................................................................................................................................................111
addPageRectangle...............................................................................................................................................................................113
addRotateBegin ....................................................................................................................................................................................115
addRotateEnd ........................................................................................................................................................................................117
addCut ......................................................................................................................................................................................................118
addPulse ..................................................................................................................................................................................................119
addSound................................................................................................................................................................................................121
addFeedPosition ...................................................................................................................................................................................124
addLayout ...............................................................................................................................................................................................125
addCommand........................................................................................................................................................................................129

5
getMaintenanceCounter....................................................................................................................................................................130
resetMaintenanceCounter ................................................................................................................................................................132
getPrinterSetting ..................................................................................................................................................................................134
setPrinterSetting...................................................................................................................................................................................137
getPrinterSettingEx .............................................................................................................................................................................141
setPrinterSettingEx ..............................................................................................................................................................................142
getPrinterInformation.........................................................................................................................................................................144
downloadFirmwareList.......................................................................................................................................................................148
getPrinterFirmwareInfo......................................................................................................................................................................150
verifyUpdate...........................................................................................................................................................................................152
updateFirmware....................................................................................................................................................................................154
forceRecover...........................................................................................................................................................................................157
forcePulse ................................................................................................................................................................................................158
forceStopSound ....................................................................................................................................................................................160
forceCommand......................................................................................................................................................................................161
forceReset................................................................................................................................................................................................162
setStatusChangeEventListener .......................................................................................................................................................163
setReceiveEventListener ....................................................................................................................................................................165
setGetPrinterSettingExListener .......................................................................................................................................................167
setSetPrinterSettingExListener........................................................................................................................................................169
interval......................................................................................................................................................................................................171
■ HybridPrinter class........................................................................................................... 172
HybridPrinter..........................................................................................................................................................................................172
connect ....................................................................................................................................................................................................173
disconnect...............................................................................................................................................................................................176
startMonitor ...........................................................................................................................................................................................177
stopMonitor............................................................................................................................................................................................178
getStatus..................................................................................................................................................................................................179
sendData..................................................................................................................................................................................................181
beginTransaction ..................................................................................................................................................................................182
endTransaction......................................................................................................................................................................................183
clearCommandBuffer..........................................................................................................................................................................184
selectPaperType....................................................................................................................................................................................185
waitInsertion ..........................................................................................................................................................................................186
cancelInsertion......................................................................................................................................................................................187
ejectPaper ...............................................................................................................................................................................................188
readMicrData..........................................................................................................................................................................................189
cleanMicrReader ...................................................................................................................................................................................190
forceRecover...........................................................................................................................................................................................191
forcePulse ................................................................................................................................................................................................192
forceCommand......................................................................................................................................................................................194
forceReset................................................................................................................................................................................................195
paperType ...............................................................................................................................................................................................196
interval......................................................................................................................................................................................................197
waitTime ..................................................................................................................................................................................................198
mode40Cpl .............................................................................................................................................................................................199
setStatusChangeEventListener .......................................................................................................................................................200
setReceiveEventListener ....................................................................................................................................................................202
■ LineDisplay class .............................................................................................................. 205
LineDisplay..............................................................................................................................................................................................205
connect ....................................................................................................................................................................................................206
disconnect...............................................................................................................................................................................................209
getStatus..................................................................................................................................................................................................210
sendData..................................................................................................................................................................................................211
clearCommandBuffer..........................................................................................................................................................................212
addInitialize ............................................................................................................................................................................................213

6
addCreateWindow ...............................................................................................................................................................................214
addDestroyWindow.............................................................................................................................................................................216
addSetCurrentWindow.......................................................................................................................................................................217
addClearCurrentWindow...................................................................................................................................................................218
addCreateScreen ..................................................................................................................................................................................219
addCreateScreenCustom...................................................................................................................................................................222
addCreateTextArea...............................................................................................................................................................................225
addDestroyTextArea............................................................................................................................................................................227
addSetCurrentTextArea......................................................................................................................................................................228
addClearCurrentTextArea..................................................................................................................................................................229
addSetCursorPosition .........................................................................................................................................................................230
addMoveCursorPosition ....................................................................................................................................................................232
addSetCursorType................................................................................................................................................................................233
addText.....................................................................................................................................................................................................234
addReverseText .....................................................................................................................................................................................237
addMarqueeText...................................................................................................................................................................................239
addSetBlink.............................................................................................................................................................................................241
addSetBrightness .................................................................................................................................................................................242
addBackgroundColor..........................................................................................................................................................................243
addStartSlideShow ..............................................................................................................................................................................245
addStopSlideShow...............................................................................................................................................................................246
addDownloadImage ...........................................................................................................................................................................247
addRegisterDownloadImage ...........................................................................................................................................................249
addNVImage ..........................................................................................................................................................................................251
addClearImage ......................................................................................................................................................................................253
addSymbol..............................................................................................................................................................................................254
addClearSymbol....................................................................................................................................................................................257
addShowClock.......................................................................................................................................................................................258
addCommand........................................................................................................................................................................................259
setReceiveEventListener ....................................................................................................................................................................260
■ Keyboard class ................................................................................................................. 262
Keyboard .................................................................................................................................................................................................262
connect ....................................................................................................................................................................................................263
disconnect...............................................................................................................................................................................................265
getStatus..................................................................................................................................................................................................266
setPrefix....................................................................................................................................................................................................267
getPrefix...................................................................................................................................................................................................268
setKeyPressEventListener..................................................................................................................................................................269
setReadStringEventListener .............................................................................................................................................................270
■ POSKeyboard class........................................................................................................... 271
PosKeyboard ..........................................................................................................................................................................................271
connect ....................................................................................................................................................................................................272
disconnect...............................................................................................................................................................................................274
getStatus..................................................................................................................................................................................................275
setKeyPressEventListener..................................................................................................................................................................276
■ BarcodeScanner class....................................................................................................... 277
BarcodeScanner ....................................................................................................................................................................................277
connect ....................................................................................................................................................................................................278
disconnect...............................................................................................................................................................................................281
getStatus..................................................................................................................................................................................................282
setScanEventListener..........................................................................................................................................................................283
■ MSR class.......................................................................................................................... 284
Msr .............................................................................................................................................................................................................284
connect ....................................................................................................................................................................................................285

7
disconnect...............................................................................................................................................................................................287
getStatus..................................................................................................................................................................................................288
setDataEventListener ..........................................................................................................................................................................289
■ SimpleSerial class ............................................................................................................ 291
SimpleSerial............................................................................................................................................................................................291
connect ....................................................................................................................................................................................................292
disconnect...............................................................................................................................................................................................294
getStatus..................................................................................................................................................................................................295
sendCommand......................................................................................................................................................................................296
setReceiveEventListener ....................................................................................................................................................................297
■ GermanyFiscalElement Class ........................................................................................... 298
GermanyFiscalElement.......................................................................................................................................................................298
connect ....................................................................................................................................................................................................299
disconnect...............................................................................................................................................................................................303
getStatus..................................................................................................................................................................................................304
operate .....................................................................................................................................................................................................305
setReceiveEventListener ....................................................................................................................................................................306
■ OtherPeripheral class....................................................................................................... 308
OtherPeripheral.....................................................................................................................................................................................308
connect ....................................................................................................................................................................................................309
disconnect...............................................................................................................................................................................................311
getStatus..................................................................................................................................................................................................312
sendData..................................................................................................................................................................................................313
setReceiveEventListener ....................................................................................................................................................................314
■ CommBox class................................................................................................................. 315
CommBox................................................................................................................................................................................................315
connect ....................................................................................................................................................................................................316
disconnect...............................................................................................................................................................................................318
getStatus..................................................................................................................................................................................................319
getCommHistory ..................................................................................................................................................................................320
sendMessage .........................................................................................................................................................................................322
setReceiveEventListener ....................................................................................................................................................................324
■ Common to all classes ...................................................................................................... 325
getAdmin.................................................................................................................................................................................................325
getLocation.............................................................................................................................................................................................326
setConnectionEventListener ............................................................................................................................................................327
■ Discovery class ................................................................................................................. 329
start............................................................................................................................................................................................................329
stop............................................................................................................................................................................................................334
■ Epos2Exception class ....................................................................................................... 335
getErrorStatus........................................................................................................................................................................................335
■ Log class ........................................................................................................................... 336
setLogSettings.......................................................................................................................................................................................336
SdkVersion ..............................................................................................................................................................................................338
■ EasySelect class................................................................................................................ 339
parseNFC .................................................................................................................................................................................................339
parseQR....................................................................................................................................................................................................340
createQR ..................................................................................................................................................................................................341
■ EasySelectInfo class ......................................................................................................... 342
deviceType ..............................................................................................................................................................................................342

8
printerName ...........................................................................................................................................................................................342
macAddress ............................................................................................................................................................................................342
■ Status list ......................................................................................................................... 343
Error Status and countermeasures.................................................................................................................................................343
Callback Code and countermeasures............................................................................................................................................345
Printer Status and countermeasures .............................................................................................................................................348
■ Key code list ..................................................................................................................... 352

Device Specifications..................................................................354
■ List of Supported Classes ................................................................................................. 354
■ List of Supported APIs...................................................................................................... 357
Printer class.............................................................................................................................................................................................357
LineDisplay class ...................................................................................................................................................................................370
Common to all classes ........................................................................................................................................................................377
EasySelect class .....................................................................................................................................................................................379
■ Printer-specific Support Information .............................................................................. 381
TM-m10 ....................................................................................................................................................................................................381
TM-m30 ....................................................................................................................................................................................................386
TM-m30II..................................................................................................................................................................................................393
TM-m30II-H .............................................................................................................................................................................................400
TM-m30II-NT...........................................................................................................................................................................................406
TM-m30II-S..............................................................................................................................................................................................412
TM-m30II-SL............................................................................................................................................................................................418
TM-m50 ....................................................................................................................................................................................................424
TM-T20......................................................................................................................................................................................................431
TM-T20II....................................................................................................................................................................................................435
TM-T20III ..................................................................................................................................................................................................440
TM-T20IIIL ................................................................................................................................................................................................445
TM-T20X ...................................................................................................................................................................................................449
TM-T60......................................................................................................................................................................................................453
TM-T70......................................................................................................................................................................................................457
TM-T70II....................................................................................................................................................................................................461
TM-T81II....................................................................................................................................................................................................465
TM-T81III ..................................................................................................................................................................................................469
TM-T82......................................................................................................................................................................................................473
TM-T82II....................................................................................................................................................................................................477
TM-T82III ..................................................................................................................................................................................................481
TM-T82IIIL ................................................................................................................................................................................................486
TM-T82X ...................................................................................................................................................................................................490
TM-T83II....................................................................................................................................................................................................494
TM-T83III ..................................................................................................................................................................................................498
TM-T88V ...................................................................................................................................................................................................502
TM-T88VI ..................................................................................................................................................................................................506
TM-T88VII.................................................................................................................................................................................................513
TM-T100 ...................................................................................................................................................................................................520
TM-L90 Liner-Free Label Printer Model ........................................................................................................................................524
TM-U220 ..................................................................................................................................................................................................528
TM-U330 ..................................................................................................................................................................................................531
EU-m30.....................................................................................................................................................................................................534
TM-P20 .....................................................................................................................................................................................................540
TM-P60 (Receipt)...................................................................................................................................................................................547
TM-P60 (Peeler) .....................................................................................................................................................................................551

9
TM-P60II (Receipt) ................................................................................................................................................................................556
TM-P60II (Peeler)...................................................................................................................................................................................561
TM-P80 .....................................................................................................................................................................................................566
TM-H6000V .............................................................................................................................................................................................572
TM-T20II-i.................................................................................................................................................................................................577
TM-T70-i ...................................................................................................................................................................................................582
TM-T82II-i.................................................................................................................................................................................................586
TM-T83II-i.................................................................................................................................................................................................591
TM-T88V-i.................................................................................................................................................................................................596
TM-T88VI-iHUB.......................................................................................................................................................................................601
TM-U220-i................................................................................................................................................................................................608
TM-T70II-DT.............................................................................................................................................................................................611
TM-T70II-DT2 ..........................................................................................................................................................................................616
TM-T88V-DT ............................................................................................................................................................................................621
TM-T88VI-DT2.........................................................................................................................................................................................626
TM-H6000IV-DT .....................................................................................................................................................................................631
TM-T88IV ..................................................................................................................................................................................................636
TM-T90......................................................................................................................................................................................................640
TM-L90......................................................................................................................................................................................................644
TM-H6000IV ............................................................................................................................................................................................648
■ Usage restriction by firmware version ............................................................................. 652
TM-i Series/TM-DT Series ...................................................................................................................................................................652
TM-m30 ....................................................................................................................................................................................................653
TM-m30II-H/TM-m30II-NT/TM-m30II-S/TM-m30II-SL..............................................................................................................654
TM-T88VI ..................................................................................................................................................................................................654
TM-T88VI-iHUB.......................................................................................................................................................................................655

Sample Programs .......................................................................656


■ Functionality.................................................................................................................... 656
ePOS2Printer ..........................................................................................................................................................................................656
ePOS2 Hybrid Printer ..........................................................................................................................................................................657
ePOS2Discovery....................................................................................................................................................................................657
ePOS2LineDisplay ................................................................................................................................................................................657
ePOS2Keyboard ....................................................................................................................................................................................658
ePOS2POSKeyboard ............................................................................................................................................................................658
ePOS2BarcodeScanner.......................................................................................................................................................................658
ePOS2MSR...............................................................................................................................................................................................658
ePOS2SimpleSerial...............................................................................................................................................................................659
ePOS2GermanyFiscalElement..........................................................................................................................................................659
ePOS2OtherPeripheral .......................................................................................................................................................................660
ePOS2CommBox...................................................................................................................................................................................660
ePOS2EasySelect ..................................................................................................................................................................................660
■ Use Environment.............................................................................................................. 661
■ Installation Procedure ..................................................................................................... 661

Application Guide.......................................................................664
■ To connect via USB ........................................................................................................... 664
■ To search printers............................................................................................................. 665

10
■ To monitor continuously .................................................................................................. 666
■ To use the same printer from multiple mobile devices .................................................... 668
■ To specify a transaction.................................................................................................... 669
■ To reconnect to the network automatically ..................................................................... 670
■ To transmit and receive the data between applications .................................................. 671
■ To perform forward printing............................................................................................ 673
■ To select a printer using its NFC tag ................................................................................. 675
■ To select a printer using its QR code................................................................................. 677
■ To perform check process................................................................................................. 679
■ To control multiple peripheral devices ............................................................................ 681
■ To control multiple peripheral devices ............................................................................ 682
■ To update the printer firmware version ........................................................................... 683

Appendix ....................................................................................684
■ Open Source Software Licensing ..................................................................................... 684
Sample Programs..................................................................................................................................................................................684
libraries.....................................................................................................................................................................................................684

11
Chapter 1 Functionality - Application Development in Epson ePOS SDK for Android

Functionality
Epson ePOS SDK for Android is an SDK for developing Android applications. Using Epson ePOS SDK for Android
enables the use of simple code to control TM printers. Also, in some TM printers, peripheral devices such as the
customer display and barcode scanner that are connected to the printer, and slave printers that are connected
over a network can be controlled. In addition, application software using unique functions such as the spooler
function and Communication Box, etc. can also be developed.

In this manual, printers are classified as follows.

Type Description
Collective name for the following receipt printer models:
• Single-function models
• Mobile models
TM Printers
• Hybrid models
• TM-i Series
• TM-DT Series

A collective name for TM printers connected over a network that are


Slave Printers
controlled from a smart device via the master TM printer.

Application Development in Epson ePOS SDK for Android


The following section describes the system configurations of applications developed in Epson ePOS SDK for
Android.
Refer to the Technical Reference Guide of each printer for information on system configuration methods.

12
Chapter 1 Functionality - Application Development in Epson ePOS SDK for Android

TM Printer Models
This is a system in which a smart device and TM printer are connected through communication.
A connection method (Bluetooth/Wi-Fi/Ethernet/USB) conforming to the specifications of your smart device and
TM printer can be selected.
Multiple TM printers can be controlled via a Wi-Fi/Ethernet connection.

TM Prin
ter

13
Chapter 1 Functionality - Application Development in Epson ePOS SDK for Android

Customer Display Models


This is a system in which the TM printer and customer display are controlled from a smart device.
The customer display is connected to the TM printer, and the smart device and TM printer are connected through
communication.
A connection method (Bluetooth/Wi-Fi/Ethernet/USB) conforming to the specifications of your smart device and
TM printer can be selected.

TM Prin
ter

When using the DM-D70 in the following cases, the ePOS-Device settings of the DM-D70 must be changed
to "DM-D30".
• In a system using SSL/TSL communication for establishing a connection between the printer and the
smart device, replace the DM-D30 with the DM-D70.
• Replace the DM-D30 connected to the TM-m30/TM-m30II/TM-m50/TM-T88VI/TM-T88VI-iHUB with the
DM-D70.
To change the ePOS-Device settings of the DM-D70, use the DM-D70 Utility.

14
Chapter 1 Functionality - Application Development in Epson ePOS SDK for Android

TM Printer + DM-D + barcode scanner model


This is a system in which the TM Printer and DM-D (customer display), as well as the barcode scanner are
controlled from a smart device.
The DM-D and the barcode scanner are connected to the TM Printer, and the smart device and TM Printer are
connected through communication.
A connection method (Bluetooth/Wi-Fi/Ethernet/USB) conforming to the specifications of your smart device and
the TM Printer can be selected.
TM Printer + DM-D + barcode scanner model can be configured by combining together the following TM
printers and DM-D.

DM-D30 DM-D70
TM-m30 ✔ -
TM-m30II ✔ -
TM-m30II-H ✔ ✔
TM-m30II-NT ✔ ✔
TM-m30II-S ✔ ✔
TM-m30II-SL ✔ ✔
TM-m50 ✔ -
TM-T88VI ✔ -
TM-T88VII ✔ ✔

TM Prin
ter

• The ePOS-Device settings of the TM printer must be set to "Enable."


∗ The ePOS-Device settings are made from EpsonNet Config (Web version) of the TM-m30.
∗ The default settings for the ePOS-Device settings of the TM-m30II/TM-m30II-H/TM-m30II-NT vary
according to the destination.
Check the settings in EpsonNet Config (Web version) or TM-m30II Utility.
∗ The ePOS-Device settings of TM-m30II-S/TM-m30II-SL have been enabled by default.
∗ The default settings for the ePOS-Device settings of the TM-m50 vary according to the destination.
Check the settings in EpsonNet Config (Web version) or TM-m50 Utility.
∗ The TM-T88VI ePOS-Device settings are carried out in TM-T88VI Utility.
∗ The TM-T88VII ePOS-Device settings are carried out in TM-T88VII Utility.
• A combination of TM Printer + barcode scanner can also be used.

15
Chapter 1 Functionality - Application Development in Epson ePOS SDK for Android

POS Terminal Model


This is a system in which a smart device and the TM printer (master) that acts as the POS terminal are connected
through Wi-Fi/Ethernet network communication, and operation is performed by connecting multiple peripheral
devices such as slave printers and customer display, etc. to the master printer.

Slave P
rinter

Master
Printer

In addition to Epson's peripheral devices, the POS terminal model can control various peripheral devices from
the device control program and device control script originally developed by Epson.
Since the software to be loaded and the version of the software differ depending on the TM printer that acts as
the POS terminal, the peripheral devices that can be controlled are also different.
For details on controllable peripheral devices, refer to the Technical Reference Guide of the printer.
The device control programs are implemented in TM-DT series (TM-DT software version 4.0 or later).
Refer to TM-DT Series Peripheral Device Control Guide for information on the device control programs and
device control scripts.

16
Chapter 1 Functionality - Epson ePOS SDK for Android Development Environment

Epson ePOS SDK for Android Development Environment


The following development environment needs to be prepared to develop applications using the Epson ePOS
SDK for Android.
❏ Android SDK r15 or later
❏ Java Development Kit 7 or later

Application Operating Environment


This section describes the operating environment for applications developed using the Epson ePOS SDK for
Android.
For the most recent information on applicable smart devices, refer to the README.en.txt file contained in the
"Epson ePOS SDK for Android" package.

Supported printers
The following list of printers can be controlled from the applications.

Usable interfaces vary depending on the specific TM printer. Refer to the Technical Reference Guide of each
printer for more information.

Single-function models
❏ TM-m10 ❏ TM-T20IIIL ❏ TM-T82X
❏ TM-m30 ❏ TM-T20X ❏ TM-T83II
❏ TM-m30II ❏ TM-T60 ❏ TM-T83III
❏ TM-m30II-H ❏ TM-T70 ❏ TM-T88V
❏ TM-m30II-NT ❏ TM-T70II ❏ TM-T88VI
❏ TM-m30II-S ❏ TM-T81II ❏ TM-T88VII
❏ TM-m30II-SL ❏ TM-T81III ❏ TM-T100
❏ TM-m50 ❏ TM-T82 ❏ TM-L90 Liner-Free Label Printer Model
❏ TM-T20 ❏ TM-T82II ❏ TM-U220
❏ TM-T20II ❏ TM-T82III ❏ TM-U330
❏ TM-T20III ❏ TM-T82IIIL ❏ EU-m30

Mobile models
❏ TM-P20 ❏ TM-P60II
❏ TM-P60 ❏ TM-P80

Hybrid models
❏ TM-H6000V

17
Chapter 1 Functionality - Application Operating Environment

TM-i Series
❏ TM-T20II-i ❏ TM-T88V-i (TM-i firmware Ver. 4.0 or later)
❏ TM-T70-i (TM-i firmware Ver. 4.0 or later) ❏ TM-T88VI-iHUB
❏ TM-T82II-i ❏ TM-U220-i
❏ TM-T83II-i

TM-DT Series
❏ TM-T70II-DT ❏ TM-T88VI-DT2
❏ TM-T70II-DT2 ❏ TM-H6000IV-DT
❏ TM-T88V-DT

18
Chapter 1 Functionality - Application Operating Environment

Functions provided in each printer


Among the functions provided by Epson ePOS SDK for Android, those that can be used differ according to the
printer.
Refer to the list below.

Ringing control of optional external buzzer


Ringing control of built-in buzzer

Simple selection using QR code


Simple selection using NFC tag
Control of peripheral devices*2
Printing by multiple interfaces
SSL/TLS communication*1

Spooler/Print Forwarding
Control of slave printers

Communication Box
TM-m10 - - ✔ ✔ - - - - ✔ ✔
*5
TM-m30 - - ✔ ✔ - - - ✔ ✔ ✔
TM-m30II - - ✔ ✔*5 - - - ✔ ✔ ✔
TM-m30II-H - - ✔ ✔*5 - - - ✔ ✔ ✔
*5
TM-m30II-NT - - ✔ ✔ - - - ✔ ✔ ✔
TM-m30II-S - - ✔ ✔*5 - - - ✔ - ✔
*5
TM-m30II-SL - - ✔ ✔ - - - ✔ - ✔
TM-m50 - - ✔ ✔*5 - - - ✔ ✔ ✔
TM-T20 - - ✔ - - - - - - ✔
TM-T20II - - ✔ - - - - - - ✔
TM-T20III - - ✔ - - - - - - ✔
TM-T20IIIL - - ✔ - - - - - - ✔
TM-T20X - - ✔ - - - - - - ✔
TM-T60 - - - - - - - - - ✔
TM-T70 - - ✔ - - - - - - ✔
TM-T70II - ✔*4 ✔ - - - - - - ✔
TM-T81II - - - - - - - - - ✔
TM-T81III - - ✔ - - - - - - ✔
TM-T82 - - ✔ - - - - - - ✔
TM-T82II - ✔*4 ✔ - - - - - - ✔
TM-T82III - ✔*4 ✔ - - - - - - ✔
TM-T82IIIL - - ✔ - - - - - - ✔
TM-T82X - - ✔ - - - - - - ✔
TM-T83II - ✔*4 ✔ - - - - - - ✔

19
Chapter 1 Functionality - Application Operating Environment

Ringing control of optional external buzzer


Ringing control of built-in buzzer

Simple selection using QR code


Simple selection using NFC tag
Control of peripheral devices*2
Printing by multiple interfaces
SSL/TLS communication*1

Spooler/Print Forwarding
Control of slave printers

Communication Box
TM-T83III - - ✔ - - - - - - ✔
TM-T88V - ✔*4 ✔ - - - - - - ✔
TM-T88VI ✔*3 ✔*4 ✔ ✔*5 ✔ ✔ - ✔ ✔ ✔
*3
TM-T88VII ✔ ✔*4 ✔ ✔*5 - - - ✔ ✔ ✔
TM-T100 - - ✔ - - - - - - ✔
TM-L90 Liner-Free Label Printer
- - ✔ - - - - - - ✔
Model
TM-U220 - - - - - - - - - ✔
TM-U330 - - - - - - - - - ✔
EU-m30 - - - ✔ - - - - - ✔
TM-P20 - ✔ - - - - - - ✔ ✔
TM-P60 - - - - - - - - - ✔
TM-P60II - ✔ - - - - - - ✔ ✔
TM-P80 - ✔ - - - - - - ✔ ✔
TM-H6000V ✔ - - ✔ - - - ✔ ✔ ✔
TM-T20II-i ✔ - ✔ - ✔ ✔ ✔ ✔ - -
TM-T70-i ✔ - - - ✔ ✔ ✔ ✔ - -
TM-T82II-i ✔ ✔*4 ✔ - ✔ ✔ ✔ ✔ - -
TM-T83II-i ✔ ✔*4 ✔ - ✔ ✔ ✔ ✔ - -
TM-T88V-i ✔ - ✔ - ✔ ✔ ✔ ✔ - -
*4
TM-T88VI-iHUB ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ -
TM-U220-i ✔ - - - ✔ ✔ ✔ ✔ - -
TM-T70II-DT ✔ - ✔ - ✔ ✔ ✔ ✔ - -
TM-T70II-DT2 ✔ - ✔ - ✔ ✔ ✔ ✔ - -
TM-T88V-DT ✔ - ✔ - ✔ ✔ ✔ ✔ - -
TM-T88VI-DT2 ✔ - ✔ - ✔ ✔ ✔ ✔ - -
TM-H6000IV-DT ✔ - - - ✔ ✔ ✔ ✔ - -

20
Chapter 1 Functionality - Application Operating Environment

*1: To communicate with the printer using SSL/TLS, select "TCPS" as the connection type in the connect API.

*2: The peripheral devices that can be used differ according to the printer. Refer to the Technical Reference Guide of each printer.

*3: Cannot be used in the system configuration of the customer display + barcode scanner model.

*4: Supports ringing control by the drawer kick command.

*5: Cannot be used in a system configuration with TM printer + barcode scanner.

21
Chapter 1 Functionality - Application Operating Environment

Controllable Peripheral Devices


Control of the following peripheral devices is supported in Epson ePOS SDK for Android.

• The peripheral devices that can be used differ according to the printer. Refer to Functions provided in
each printer or the Technical Reference Guide of each printer.
• By developing a device control program, a TM-DT series printer can control peripheral devices other than
those introduced here.
Refer to TM-DT Series Peripheral Device Control Guide for information on the development.

Slave printer
Wi-Fi enabled models of the following TM printers
❏ TM-P20
❏ TM-P60II (Peeler)
❏ TM-P80

The following TM printers that are equipped with a Wi-Fi/Ethernet interface


❏ TM-T20 ❏ TM-T82X
❏ TM-T20II ❏ TM-T83II
❏ TM-T20III ❏ TM-T83III
❏ TM-T20IIIL ❏ TM-T88IV
❏ TM-T20X ❏ TM-T88V
❏ TM-T70 ❏ TM-T88VI
❏ TM-T70II ❏ TM-T90
❏ TM-T81III ❏ TM-T100
❏ TM-T82II ❏ TM-L90
❏ TM-T82III ❏ TM-U220
❏ TM-T82IIIL ❏ TM-H6000IV

The following TM-i Series/TM-DT Series


❏ TM-T20II-i ❏ TM-T88V-i (TM-i firmware Ver. 4.0 or later)
❏ TM-T70-i (TM-i firmware Ver. 4.0 or later) ❏ TM-T88V-DT (TM-DT software Ver.4.0 or later)
❏ TM-T70II-DT (TM-DT software Ver.4.0 or later) ❏ TM-U220-i
❏ TM-T82II-i ❏ TM-H6000IV-DT (TM-DT software Ver.4.0 or later)
❏ TM-T83II-i

22
Chapter 1 Functionality - Application Operating Environment

Customer display
❏ DM-D30 ❏ DM-D110
❏ DM-D70 ❏ DM-D210

• When using DM-D70, available display mode (Standard mode or Fixed column and row mode) varies by
connected printer.
For more details, see DM-D70 Technical Reference Guide.
• When replacing the DM-D30 with the DM-D70 in the following system configurations, use the DM-D70 in
the column/row fixed mode.
∗ Customer Display Models (SSL/TLS communication)
∗ TM Printer+DM-D+barcode scanner model
∗ POS Terminal Model

Peripheral Devices that can be Controlled by Device Control Programs


Peripheral devices conforming to the OPOS specifications can be controlled using the device control programs
that are supported by TM-DT series (TM-DT software version 4.0 or later).
In the categories described below, peripheral devices having a driver that runs in combination with OPOS
Common Control Object (OPOS CCO) 1.14.001 can be controlled.
❏ MSR
❏ POS keyboard
❏ Barcode scanner

Peripheral Devices that can be Controlled by Device Control Scripts


The peripheral devices listed below can be controlled from the device control scripts of the TM-i series/TM-DT
series.
❏ Key input device
• MSR (Hitachi-Omron Terminal Solutions, Corp.)
• Keyboard (Standard HID device)
• Barcode scanner (Standard HID device)
❏ Serial communication device

23
Chapter 1 Functionality - Downloadable Content

Downloadable Content
Epson ePOS SDK for Android packages include the following files.

Filename/Folder name Description


ePOS2.jar Java archive that contains Java class files compiled to use the APIs in
Java program.

ePOSEasySelect.jar Contains Java class files that enable simple printer selection.

libepos2.so Libraries used for execution of functions (Compatible with ARMv5TE).

libeposeasyselect.so Libraries used for functions that enable easy printer selection (Com-
patible with ARMv5TE).

armeabi This is the folder to store libraries for ARMv5TE.


The following files are stored:
• libepos2.so
• libeposeasyselect.so

armeabi-v7a This is the folder to store libraries for armeabi.


The following files are stored:
• libepos2.so
• libeposeasyselect.so

arm64-v8a This is the folder to store libraries for AArch64.


The following files are stored:
• libepos2.so
• libeposeasyselect.so

x86 This is the folder to store libraries for x86 (IA-32).


The following files are stored:
• libepos2.so
• libeposeasyselect.so

x86_64 This is the folder to store libraries for x86-64.


The following files are stored:
• libepos2.so
• libeposeasyselect.so
Operation is confirmed on virtual devices with architecture x86_64
and Android API 28 (Google APIs).

OPOS_CCOs_1.14.001.msi This is the OPOS CCO installer package.

ePOS2_Sample_Android.zip These files are sample programs.

DeviceControlProgram_Sample.zip This file contains sample device control programs.

README.jp.txt This is the Japanese README file.

README.en.txt This is the English README file.

EULA.jp.txt This is the Japanese software license agreement.

EULA.en.txt This is the English software license agreement.

ePOS_SDK_Android_um_ja_revx.pdf This is the Japanese user manual.

24
Chapter 1 Functionality - Web Content

Filename/Folder name Description


ePOS_SDK_Android_um_en_revx.pdf This is the English user manual.

TM-DT_Peripherals_ja_revx.pdf This is the Japanese TM-DT Series Peripheral Device Control Guide.
This guide describes how to control peripheral devices with TM-DT
series.

TM-DT_Peripherals_en_revx.pdf This is the English TM-DT Series Peripheral Device Control Guide.

JSON_Specification.pdf This is the JSON specifications. This describes the JSON specifications
that are used for GermanyFiscalElement class.

JSON_Spec_sheet.pdf This explains the JSON specifications used in setPrinterSettingEx and


setGetPrinterSettingExListener.

ePOS_SDK_Android_Migration_Guide_ This is the Japanese migration guide. This guide describes the proce-
ja_revx.pdf dure to migrate from the ePOS-Print SDK or ePOS-Device SDK.

ePOS_SDK_Android_Migration_Guide_ This is the English migration guide.


en_revx.pdf

Web Content
Online reference is publicly available from the following website.
https://reference.epson-biz.com/pos/reference/

Limitations
❏ Set the barcode scanner suffix to CR (carriage return code). Data cannot be obtained using any other settings.
❏ When using 2D barcode scanners, Japanese and other multi-byte characters cannot be read correctly.
However, when the following printer and 2D barcode scanner are used in combination to read QR codes,
multi-byte characters in UTF-8 encoding can be acquired correctly.
• TM-m30 • TM-m30II-SL
• TM-m30II • TM-m50
• TM-m30II-H • TM-T88VI
• TM-m30II-NT • TM-T88VII
• TM-m30II-S
❏ Control codes cannot be read from 2D barcode data if it contains ASCII control codes (0x00 through 0x1F).
❏ The number of device ports that can be simultaneously opened in the same application is 16 ports.
❏ Activity may sometimes be destroyed when rotating the screen. When storing print instances as Activity, call
closePrinter from the Print class before the Activity is destroyed.
❏ Communication will be disrupted if a terminal enters sleep mode while communicating with a printer via a
Bluetooth connection.
❏ When using a virtual device, a MAC address cannot be used in the target parameter for the connect API.

25
Chapter 2 How to Use - Printer Connections

How to Use
This section describes how to create Epson ePOS SDK for Android projects and some basic programming
methods used in the Epson ePOS SDK for Android.

Printer Connections
Connect smart devices and printers using a connection method that matches the system you want to create.
Refer to the Technical Reference Guide of each printer for more information.

To connect via USB, refer to To connect via USB.

Creating an Epson ePOS SDK for Android Project


You can get the Android Studio from the following URL.
http://developer.android.com/sdk/index.html

1 Start Android Studio and click on Start a new Android Studio project to create a new
project.

26
Chapter 2 How to Use - Creating an Epson ePOS SDK for Android Project

2 Configure the project in accordance with the type of application you will create.
Configure the project in accordance with the instructions shown on the screen.

3 Store ePOS2.jar and ePOSEasySelect.jar in the following location.


C:\Users\[account name]\AndroidStudioProjects\[project name]\app\libs
The folder structure after [project name] is automatically created when the project is created.

4 Create the following folder structure.


C:\Users\[account name]\AndroidStudioProjects\[project name]\app\src\main\jniLibs

5 Depending on your CPU, store the following folders bundled with this package in the
jniLibs folder:
❏ armeabi
❏ arm64-v8a
❏ armeabi-v7a
❏ x86
❏ x86_64

27
Chapter 2 How to Use - Creating an Epson ePOS SDK for Android Project

6 Open the project that was created in Android Studio.

7 Run Clean Project from the Build menu.

8 Double-click on AndroidManifest.xml.

28
Chapter 2 How to Use - Creating an Epson ePOS SDK for Android Project

9 Under the <manifest> element, declare the permission that specifies the method for
connecting with devices.
It is recommended to declare the permission even when connecting with a device via USB.
Refer to README.en.txt for more information.

❏ TCP
When using an application software that runs on Android 4.3.1 or lower, add permissions for the
storage shown below.

<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"/>

❏ Wi-Fi

<uses-permission android:name="android.permission.INTERNET"/>

❏ Bluetooth
“ACCESS_COARSE_LOCATION” is required for Android 6.0 or later.

<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission
android:name="android.permission.ACCESS_COARSE_LOCATION"/>

29
Chapter 2 How to Use - Programming Guide

Programming Guide
This section describes some of the basic programming methods used in the Epson ePOS SDK for Android.

Programming Flow
This section describes a flow to create a program for controlling printers or peripheral devices respectively.
❏ Controlling Printers
❏ Controlling Customer Displays
❏ Controlling Keyboards and Barcode Scanners

Do not add an API of Epson ePOS SDK in the callback.

Controlling Printers
The method of controlling the TM printer and slave printer, and programming receipt printing is described
below.

1. Printer selection (class initialization)

2. Creating print data (data buffering)

3. Sending print data (connection with the devices/communication/print-


ing/disconnection)

Printer selection (class initialization)


Initialize the Printer class and select the printer to control.

Printer printer = null;


try {
printer = new Printer(Printer.TM_T88, Printer.MODEL_ANK, this);
}
catch (Epos2Exception e) {
//Displays error messages
}

Register the print complete event listener.

printer.setReceiveEventListener(this);

30
Chapter 2 How to Use - Programming Guide

Creating print data (data buffering)


Use add* API commands in the Printer class to create print data.
In the following example, data is created to print "Hello World" aligned in the center.

try {
printer.addTextAlign(Printer.ALIGN_CENTER);
printer.addText("Hello World");
}
catch (Epos2Exception e) {
//Displays error messages
}

Sending print data (connection with the devices/communication/printing/disconnec-


tion)
Connect to the printer to which the created print data will be sent.

try {
printer.connect("TCP:192.168.192.168", Printer.PARAM_DEFAULT);
}
catch (Epos2Exception e) {
//Displays error messages
}

Run the print process and retrieve the print result in the callback. Do not add an API command in the callback.

try {
printer.sendData(Printer.PARAM_DEFAULT);
}
catch (Epos2Exception e) {
// Displays error messages
// Abort process
}

public void onPtrReceive(final Printer printerObj, final int code, final PrinterStatusInfo status,
final String printJobId) {
runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
if (code == Epos2CallbackCode.CODE_SUCCESS) {
//Displays successful print messages
}
else {
//Displays error messages
}
}
});
new Thread(new Runnable() {
@Override
public synchronized void run() {
//Abort process
}
}).start();
}

When an error occurs, the print data that has been created is not erased until the command buffer is cleared.
The print data can be used for re-printing in cases such as when the error processing ends.

31
Chapter 2 How to Use - Programming Guide

Disconnect from the printer.

try {
printer.disconnect();
}
catch (Epos2Exception e) {
//Displays error messages
}

Clear the command buffer and terminate the printer control.

printer.clearCommandBuffer();
printer.setReceiveEventListener(null);

Controlling Customer Displays


This section describes the programming methods for controlling customer displays and displaying text on
displays.

1. Device selection (class initialization)

2. Creating display data (data buffering)

3. Sending display data (connection with the devices/communication/


printing/disconnection)

Device selection (class initialization)


Initialize the LineDisplay class and connect to the customer display.

LineDisplay linedisplay = null;


try {
linedisplay = new LineDisplay(LineDisplay.DM_D30, this);
}
catch (Epos2Exception e) {
//Displays error messages
}

Register the view complete event listener.

linedisplay.setReceiveEventListener(this);

Creating display data (data buffering)


Use add* API commands in the LineDisplay class to create display data.
In the following example, data is created to display "Hello World".

try {
linedisplay.addText("Hello World");
}
catch (Epos2Exception e) {
//Displays error messages
}

32
Chapter 2 How to Use - Programming Guide

Sending display data (connection with the devices/communication/printing/disconnec-


tion)
Connect the customer display to which created display data will be sent.

try {
linedisplay.connect("TCP:192.168.192.168", LineDisplay.PARAM_DEFAULT);
}
catch (Epos2Exception e) {
//Displays error messages
}

Run the display process and retrieve the display result.

if (status.connection) {
try {
linedisplay.sendData();
}catch (Epos2Exception e) {
// Displays error messages
// Abort process
}
}else {
// Displays error messages
// Abort process
}

public void onDispReceive(final LineDisplay displayObj, final int code){


runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
if (code == Epos2CallbackCode.CODE_SUCCESS) {
//Displays successful print messages
}
else {
//Displays error messages
}
}
});
new Thread(new Runnable() {
@Override
public synchronized void run() {
//Abort process
}
}).start();
}

Disconnect from the customer display.

try {
linedisplay.disconnect();
}
catch (Epos2Exception e) {
//Displays error messages
}

Clear the command buffer and terminate the customer display control.

linedisplay.clearCommandBuffer();
linedisplay.setReceiveEventListener(null);

33
Chapter 2 How to Use - Programming Guide

Controlling Keyboards and Barcode Scanners


This section describes how to create a program that enables receiving data input from keyboards and barcode
scanners.
The following section describes the programming flow for controlling keyboards.

1. Connecting to the device

2. Receiving data

3. Disconnecting from the device

Connecting to the device


Initialize the Keyboard class, connect the keyboard, and then register the event listener that will receive input
data.

Keyboard keyboard = null;

try {
keyboard = new Keyboard(this);

keyboard.setKeyPressEventListener(mKeyPressEvent);

keyboard.connect("TCP:192.168.192.168[local_keyboard]"), Keyboard.PARAM_DEFAULT);
}
catch (Epos2Exception e) {
//Displays errors

keyboard.setKeyPressEventListener(null);
}

Receiving data
Create the key press event listener.

private KeyPressListener mKeyPressEvent = new KeyPressListener() {


@Override
public void onKbdKeyPress(Keyboard keyboardObj, final int keyCode, final String ascii) {
runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
if (keyCode != 0) {
//Displays receive messages.
}
}
});
}
};

34
Chapter 2 How to Use - Programming Guide

Disconnecting from the device


Disrupt communication to terminate the reception of input data from the keyboard.

try {
keyboard.disconnect();
}
catch (Epos2Exception e) {
//Displays errors
}

keyboard.setKeyPressEventListener(null);

keyboard = null;

35
Chapter 2 How to Use - Programming Guide

Effective range of command buffers for setting


The valid range of add* of the Printer class used for setting depends on the print method.

Receipt
Effective after setting add* until sendData is executed.
The configured values are initialized every time sendData is executed. See below.

printer.addText("Hello World!\n");
printer.addTextFont(Printer.FONT_B);
printer.addText("Hello World!\n");
printer.addText("Hello World!\n");
printer.sendData(Printer.PARAM_DEFAULT);
printer.clearCommandBuffer;
printer.addText("Hello World!\n");
printer.sendData(Printer.PARAM_DEFAULT);
printer.clearCommandBuffer;

Red letters: Font A


Green letters: Font B

Slip, Endorsement, Validation


Effective after setting add* until the paper is ejected.
The configured values are initialized each time the following APIs are executed:
❏ waitInsertion
❏ readMicrData
❏ sendData (receipt printing)
See below.

HybridPrinter.selectPaperType(HybridPrinter.PAPER_TYPE_SLIP);
HybridPrinter.waitInsertion(HybridPrinter.PARAM_DEFAULT);
HybridPrinter.addText("Hello World!\n");
HybridPrinter.addTextFont(Printer.FONT_B);
HybridPrinter.addText("Hello World!\n");
HybridPrinter.addText("Hello World!\n");
HybridPrinter.sendData(Printer.PARAM_DEFAULT);
HybridPrinter.clearCommandBuffer;
HybridPrinter.addText("Hello World!\n");
HybridPrinter.sendData(Printer.PARAM_DEFAULT);
HybridPrinter.clearCommandBuffer;
HybridPrinter.ejectPaper;
HybridPrinter.selectPaperType(HybridPritner.PAPER_TYPE_RECEIPT);
HybridPrinter.addText("Hello World!\n");
HybridPrinter.sendData(Printer.PARAM_DEFAULT);

Red letters: Font A


Green letters: Font B

36
Chapter 2 How to Use - Programming Guide

Status
The following statuses are defined in the Epson ePOS SDK for Android.
❏ Error status
Indicates a result of sending data to devices in each class. The result is sent immediately as an exception of API.
Refer to Error Status and countermeasures for more information.

Application SDK
sendData

ERR_*

❏ Callback code
Indicates a device's processing result for sendData. Notified in a print completion event (onPtrReceive/onDis-
pReceive). Refer to Callback Code and countermeasures for more information.

Application SDK
sendData

CODE_*

❏ Printer status
Indicates the status of printers when sending print data. The printer status is retrieved when executing send-
Data. Refer to Printer Status and countermeasures for more information.

Handling Exceptions
When an errors occurs while using the Epson ePOS SDK for Android, a unique exception with a numerical (int)
parameter is generated and the call originator is notified of the error. The notified error is retrieved by
getErrorStatus in the Epos2Exception class.
Refer to the following programming code.

Printer printer = null;


printer = new Printer(Printer.TM_T88, Printer.MODEL_ANK, this);
try {
printer.connect("TCP:192.168.192.168", Print.PARAM_DEFAULT);
printer.disconnect();
}
catch (Epos2Exception e) {
//Retrieves the error status
int ErrorStatus = ((Epos2Exception) e).getErrorStatus();
}

37
Chapter 3 API Reference - List of ePOS SDK API

API Reference
This chapter describes the APIs provided by Epson ePOS SDK for Android.

List of ePOS SDK API


Epson ePOS SDK for Android provides the following classes:

• Available APIs and parameters vary by printer model and peripheral device.
Refer to List of Supported Classes.
• For the list of APIs of each class, and the APIs supported by each printer, refer to List of Supported APIs.

❏ Printer class
❏ HybridPrinter class
❏ LineDisplay class
❏ Keyboard class
❏ POSKeyboard class
❏ BarcodeScanner class
❏ MSR class
❏ SimpleSerial class
❏ GermanyFiscalElement class
❏ OtherPeripheral class
❏ CommBox class
❏ Common to all classes
❏ Discovery class
❏ Epos2Exception class
❏ Log class
❏ EasySelect class
❏ EasySelectInfo class

Printer class
Controls printing by the printer.

API Description
Initialization Printer Initializes the Printer class.

connect Connects to the printer.


Communication path
disconnect Disconnects from the printer.

startMonitor Enables status event notification.


Status monitor
stopMonitor Disables status event notification.

38
Chapter 3 API Reference - List of ePOS SDK API

API Description
Status acquisition getStatus Acquires status of the connected printer.

Transmission sendData Sends a command to the printer.

beginTransaction Starts a transaction.


Transaction
endTransaction Ends a transaction.

Print job requestPrintJobStatus Acquires the print result.

Buffer clear clearCommandBuffer Clears the command buffer.

Adds text alignment setting to the command


addTextAlign
buffer.

Adds line spacing setting to the command buf-


addLineSpace
fer.

Adds text rotation setting to the command buf-


addTextRotate
fer.

addText Adds text to print to the command buffer.

addTextLang Adds language setting to the command buffer.

Text Adds character font setting to the command


addTextFont
buffer.

Adds character smoothing setting to the com-


addTextSmooth
mand buffer.

Adds character scaling factor setting to the com-


addTextSize
mand buffer.

Adds character style setting to the command


addTextStyle
buffer.

Adds character print position setting to the com-


addHPosition
mand buffer.

Adds paper-feed setting in dots to the command


addFeedUnit
buffer.
Paper feed
Adds paper-feed setting in lines to the com-
addFeedLine
mand buffer.

Adds a raster image print command to the com-


addImage
mand buffer.
Graphics
Adds a NV logo print command to the command
addLogo
buffer.

Adds a barcode print command to the com-


addBarcode
mand buffer.
Barcode
Adds a 2D symbol print command to the com-
addSymbol
mand buffer.

39
Chapter 3 API Reference - List of ePOS SDK API

API Description
Adds a horizontal ruled line print command to
addHLine
the command buffer.

Adds a vertical ruled line start command to the


Ruled line addVLineBegin
command buffer.

Adds a vertical ruled line end command to the


addVLineEnd
command buffer.

Adds a page mode start command to the com-


addPageBegin
mand buffer.

Adds a page mode end command to the com-


addPageEnd
mand buffer.

Adds page mode print area setting to the com-


addPageArea
mand buffer.

Adds page mode print direction setting to the


Page mode addPageDirection
command buffer.

Adds page mode print position setting to the


addPagePosition
command buffer.

Adds a page mode line draw command to the


addPageLine
command buffer.

Adds a page mode rectangle draw command to


addPageRectangle
the command buffer.

Adds the start batch rotate print mode to the


addRotateBegin
command buffer.
Batch rotate print
Adds the end batch rotate print mode to the
addRotateEnd
command buffer.

Adds a sheet cut command to the command


Cut addCut
buffer.

Adds a drawer kick command to the command


Drawer addPulse
buffer.

Adds a buzzer sound command to the command


Buzzer addSound
buffer.

Adds a paper feed command to the command


addFeedPosition
Label sheet/ buffer.
black mark sheet Adds sheet layout setting to the command buf-
addLayout
fer.

Command addCommand Adds a command to the command buffer.

getMaintenanceCounter Acquires the counter value.


Maintenance counter
resetMaintenanceCounter Resets the counter value.

40
Chapter 3 API Reference - List of ePOS SDK API

API Description
getPrinterSetting Acquires the set value of the printer setting.

setPrinterSetting Changes the printer setting.


Printer setting Acquires the set value of the printer setting in
getPrinterSettingEx
JSON.

setPrinterSettingEx Specifies the printer setting in JSON.

Information acquisition getPrinterInformation Acquires the printer information.

downloadFirmwareList Acquires the list of the firmware.

getPrinterFirmwareInfo Acquires the information of the printer firmware.


Firmware update
verifyUpdate Acquires the result of the firmware update.

updateFirmware Instructs the printer to write the firmware image.

forceRecover

forcePulse

Forced transmission forceStopSound Forced transmission function

forceCommand

forceReset

setStatusChangeEventListener

setReceiveEventListener
Reception of result Registers the event listener registration method.
setGetPrinterSettingExListener

setSetPrinterSettingExListener

Monitor interval interval <Obsolete> Status monitor interval

The print mode includes the standard mode, page mode, and the batch rotate print mode.
• Standard mode
Prints line by line. Line spacing is automatically adjusted according to character size, image size, and bar-
code height. Suitable for printing receipts whose print length varies by print content.
• Page mode
Prints page by page. Prints characters, images, and/or barcodes on a single page that is defined as a print
area.
To print in the page mode, use addPageBegin and addPageEnd to start and end the page mode process,
respectively.
• Batch rotate print mode
This is a print mode in which the range of the print data (such as characters, images, barcodes, etc.) is set,
the print data in the set range is compiled, inverted, and then printed.
When performing the processing in the batch rotate print mode, start the batch rotate print processing
with addRotateBegin, and end the batch rotate print processing with addRotateEnd.
The APIs that can be used in each mode are described in the table below.

41
Chapter 3 API Reference - List of ePOS SDK API

Batch rotate
API Standard mode Page mode
print mode
Printer - - -

connect - - -

disconnect - - -

startMonitor ✔ ✔ ✔

stopMonitor ✔ ✔ ✔

getStatus ✔ ✔ ✔

sendData ✔ ✔ -

beginTransaction ✔ ✔ ✔

endTransaction ✔ ✔ -

requestPrintJobStatus ✔ ✔ ✔

clearCommandBuffer ✔ ✔ -

addTextAlign ✔ - ✔

addLineSpace ✔ ✔ ✔

addTextRotate ✔ - ✔

addText ✔ ✔ ✔

addTextLang ✔ ✔ ✔

addTextFont ✔ ✔ ✔

addTextSmooth ✔ ✔ ✔

addTextSize ✔ ✔ ✔

addTextStyle ✔ ✔ ✔

addHPosition ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔

addFeedLine ✔ ✔ ✔

addImage ✔ ✔ ✔

addLogo ✔ ✔ ✔

addBarcode ✔ ✔ ✔

addSymbol ✔ ✔ ✔

addHLine ✔ - ✔

addVLineBegin ✔ - ✔

addVLineEnd ✔ - ✔

addPageBegin ✔ - -

addPageEnd - ✔ -

addPageArea - ✔ -

addPageDirection - ✔ -

42
Chapter 3 API Reference - List of ePOS SDK API

Batch rotate
API Standard mode Page mode
print mode
addPagePosition - ✔ -

addPageLine - ✔ -

addPageRectangle - ✔ -

addRotateBegin ✔ - -

addRotateEnd - - ✔

addCut ✔ - -

addPulse ✔ - -

addSound ✔ - -

addFeedPosition ✔ - ✔

addLayout ✔ - ✔

addCommand ✔ ✔ ✔

HybridPrinter class
Controls the hybrid model printers.

API Description
Initialization HybridPrinter Initializes the HybridPrinter class.

connect Connects to the printer.


Communication path
disconnect Disconnects from the printer.

startMonitor Enables status event notification.


Status monitor
stopMonitor Disables status event notification.

Status acquisition getStatus Acquires status of the connected printer.

Transmission sendData Transfers a print command.

beginTransaction Starts a transaction.


Transaction
endTransaction Ends a transaction.

Buffer clear clearCommandBuffer Clears the command buffer.

Print method selectPaperType Specifies a print method.

waitInsertion Waiting for paper insertion.


Paper feed
cancelInsertion Cancels waiting for paper insertion.

Paper eject ejectPaper Ejects paper.

readMicrData MICR reading


MICR
cleanMicrReader Cleans the MICR mechanism.

43
Chapter 3 API Reference - List of ePOS SDK API

API Description
forceRecover

forcePulse
Forced transmission Forced transmission function
forceCommand

forceReset

Print method acquisition paperType Acquires the print method setting information.

Monitor interval interval Printer status update interval

Time from insertion of a paper to start of opera-


On standby waitTime
tion

40cpl mode mode40Cpl Sets the 40 cpl mode.

setStatusChangeEventListener
Reception of result Registers the event listener registration method.
setReceiveEventListener

List of supported control operations for HybridPrinter class


APIs available for the HybridPrinter class depend on the type of control operation.
The following lists control operation types and available APIs.

Control operation
API Endorse-
Receipt Slip sheet Validation MICR
ment
HybridPrinter ✔ ✔ ✔ ✔ ✔

connect ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ -

beginTransaction ✔ ✔ ✔ ✔ ✔

endTransaction ✔ ✔ ✔ ✔ ✔

clearCommandBuffer ✔ ✔ ✔ ✔ -

selectPaperType ✔ ✔ ✔ ✔ -

waitInsertion - ✔ ✔ ✔ -

cancelInsertion - ✔ ✔ ✔ ✔

ejectPaper - ✔ ✔ ✔ ✔

readMicrData - - - - ✔

cleanMicrReader - - - - ✔

setStatusChangeEventListener ✔ ✔ ✔ ✔ ✔

setReceiveEventListener ✔ ✔ ✔ ✔ ✔

44
Chapter 3 API Reference - List of ePOS SDK API

Creating print document by the HybridPrinter class


The HybridPrinter class creates a print document using the same API as the Printer class.
The APIs and corresponding print methods are listed below.

Print method

API Endorse-
Endorse-
Receipt Slip sheet ment Validation
ment
(40cpl)
addTextAlign ✔ ✔ ✔ - ✔

addLineSpace ✔ ✔ ✔ - ✔

addTextRotate ✔ ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔ ✔

addTextLang ✔ ✔ - - ✔
Text
addTextFont ✔ ✔ ✔ - ✔

addTextSmooth ✔ - - - -

addTextSize ✔ ✔ ✔ - ✔

addTextStyle ✔ ✔* ✔* - ✔*

addHPosition ✔ ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔ ✔
Paper feed
addFeedLine ✔ ✔ ✔ ✔ ✔

addImage ✔ - - - -
Graphics
addLogo ✔ - - - -

addBarcode ✔ - - - -
Barcode
addSymbol ✔ - - - -

addPageBegin ✔ ✔ - - ✔

addPageEnd ✔ ✔ - - ✔

addPageArea ✔ ✔ - - ✔

Page mode addPageDirection ✔ ✔ - - ✔

addPagePosition ✔ ✔ - - ✔

addPageLine ✔ ✔ - - -

addPageRectangle ✔ ✔ - - -

Cut addCut ✔ - - - -

Drawer addPulse ✔ ✔ ✔ ✔ ✔

Command addCommand ✔ ✔ ✔ ✔ ✔

*
The reverse parameter is not supported.

45
Chapter 3 API Reference - List of ePOS SDK API

LineDisplay class
Controls character display on the customer display.

API Description
Initialization LineDisplay Initializes the LineDisplay class.

connect Connects to the customer display.


Communication path
disconnect Disconnects from the customer display.

Status acquisition getStatus Acquires status of the connected device.

Transmission sendData Sends a command to the customer display.

Buffer clear clearCommandBuffer Clears the command buffer.

Reset addInitialize Initializes the customer display.

addCreateWindow Defines the display area.

addDestroyWindow Deletes the display area setting.

addSetCurrentWindow Switches between display areas.

addClearCurrentWindow Deletes the current display area.

addCreateScreen Defines the base window.


Window
addCreateScreenCustom Defines the base window.

addCreateTextArea Defines the display area.

addDestroyTextArea Deletes the display area setting.

addSetCurrentTextArea Switches between display areas.

addClearCurrentTextArea Deletes the current display area.

addSetCursorPosition Moves the cursor.

Cursor addMoveCursorPosition Moves the cursor within the display area.

addSetCursorType Changes the cursor display.

addText Displays text.

Text display addReverseText Displays inverted text.

addMarqueeText Displays a marquee.

addSetBlink Blinks display.

Display setting addSetBrightness Changes the display brightness.

addBackgroundColor Sets the background color.

addStartSlideShow Starts a slide show.

addStopSlideShow Ends a slide show.


Graphics
addDownloadImage Displays an image.

addRegisterDownloadImage Registers an image.

addNVImage Displays an NV image.


Graphics
addClearImage Deletes an image.

46
Chapter 3 API Reference - List of ePOS SDK API

API Description
addSymbol Displays a two-dimensional symbol.
Barcode
addClearSymbol Deletes a two-dimensional symbol.

Clock addShowClock Displays the clock.

Command transfer addCommand Runs an optional command.

Reception of result setReceiveEventListener Registers the event listener registration method.

The APIs and parameters that can be used vary depending on the customer display used and its display modes.
The table below shows the API that can be used in each customer display and display mode.

DM-D70 DM-D70
DM-D110/
API Parameter DM-D30 (Standard (Column/row fixed
DM-D210
mode) mode)
LineDisplay ✔ ✔ ✔ ✔

connect ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔

clearCommandBuffer ✔ ✔ ✔ ✔

addInitialize ✔ ✔ ✔ ✔

addCreateWindow ✔ - ✔ ✔

addDestroyWindow ✔ - ✔ ✔

addSetCurrentWindow ✔ - ✔ ✔

addClearCurrentWindow ✔ - ✔ ✔

addCreateScreen - ✔ ✔ -

addCreateScreenCustom - ✔ ✔ -

addCreateTextArea - ✔ - -

addDestroyTextArea - ✔ - -

addSetCurrentTextArea - ✔ - -

addClearCurrentTextArea - ✔ - -

addSetCursorPosition ✔ ✔ ✔ ✔

addMoveCursorPosition ✔ ✔ ✔ ✔

addSetCursorType ✔ - - ✔

47
Chapter 3 API Reference - List of ePOS SDK API

DM-D70 DM-D70
DM-D110/
API Parameter DM-D30 (Standard (Column/row fixed
DM-D210
mode) mode)
data ✔ ✔ ✔ ✔

lang ✔* ✔ ✔ ✔*

x ✔ ✔ ✔ ✔

addText y ✔ ✔ ✔ ✔

r - ✔ - -

g - ✔ - -

b - ✔ - -

addReverseText ✔ - - ✔

addMarqueeText ✔ ✔ ✔ ✔

addSetBlink ✔ - - ✔

addSetBrightness ✔ ✔ ✔ ✔

addBackgroundColor - ✔ - -

addStartSlideShow - ✔ - -

addStopSlideShow - ✔ - -

addDownloadImage - ✔ - -

addRegisterDownloadImage - ✔ - -

addNVImage - ✔ - -

addClearImage - ✔ - -

addSymbol - ✔ - -

addClearSymbol - ✔ - -

addShowClock - - - ✔

addCommand ✔ ✔ ✔ ✔

setReceiveEventListener ✔ ✔ ✔ ✔

*: The setting value LineDisplay.LANG_MULTI cannot be used.

Keyboard class
Controls character entry from the keyboard.

API Description
Initialization Keyboard Initializes the Keyboard class.

connect Connects to the keyboard.


Communication path
disconnect Disconnects from the keyboard.

Status acquisition getStatus Acquires status of the connected device.

48
Chapter 3 API Reference - List of ePOS SDK API

API Description
Sets the condition to handle as a continuous
String setting setPrefix
string.

String setting acquisition getPrefix Acquires the set prefix.

Key detection setKeyPressEventListener


Registers the event listener registration method.
String detection setReadStringEventListener

POSKeyboard class
Controls character entry from the POS keyboard.

API Description
Initialization PosKeyboard Initializes the POSKeyboard class.

connect Connects to the keyboard.


Communication path
disconnect Disconnects from the keyboard.

Status acquisition getStatus Acquires status of the connected device.

Key detection setKeyPressEventListener Registers the event listener registration method.

BarcodeScanner class
Controls barcode reading by the barcode scanner.

API Description
Initialization BarcodeScanner Initializes the BarcodeScanner class.

connect Connects to the barcode scanner.


Communication path
disconnect Disconnects from the barcode scanner.

Status acquisition getStatus Acquires status of the connected device.

Input data reception setScanEventListener Registers the event listener registration method.

MSR class
Controls card reading by the MSR.

API Description
Initialization Msr Initializes the MSR class.

connect Connects to the MSR.


Communication path
disconnect Disconnects from the MSR.

Status acquisition getStatus Acquires status of the connected device.

Data detection setDataEventListener Registers the event listener registration method.

49
Chapter 3 API Reference - List of ePOS SDK API

SimpleSerial class
Controls serial communication between the printer and device.

API Description
Initialization SimpleSerial Initializes the SimpleSerial class.

connect Connects to the serial.


Communication path
disconnect Disconnects from the serial.

Status acquisition getStatus Acquires status of the connected device.

Command transfer sendCommand Transfers a command.

Input data reception setReceiveEventListener Registers the event listener registration method.

GermanyFiscalElement class
Connects to the German fiscal element (TSE), and controls data read/write operations.

API Description
Initialization GermanyFiscalElement Initializes the GermanyFiscalElement class.

connect Connects to the German fiscal element (TSE).


Communication path Disconnects from the German fiscal element
disconnect
(TSE).

Acquires status of the German fiscal element


Status acquisition getStatus
(TSE).

Send the JSONsring to the German fiscal ele-


Operation operate
ment (TSE).

Reception of result setReceiveEventListener Registers the callback method for an event.

OtherPeripheral class
Controls peripheral devices via the developed device control programs.

API Description
Initialization OtherPeripheral Initializes the OtherPeripheral class.

connect Connects to the device.


Communication path
disconnect Disconnects from the device.

Status acquisition getStatus Acquires status of the connected device.

Transmission sendData Sends data to the peripheral device.

Reception of result setReceiveEventListener Registers the event listener registration method.

50
Chapter 3 API Reference - List of ePOS SDK API

CommBox class
Controls data transmission and reception using the communication box.

API Description
Initialization CommBox Initialize the CommBox class.

connect Connects to the communication box.


Communication path
disconnect Disconnects from the communication box.

Status acquisition getStatus Acquires status of the connected device.

Transmission history getCommHistory Acquires the message transmission history.

Transmission sendMessage Sends a message to the communication box.

Reception setReceiveEventListener Registers the event listener registration method.

Common to all classes


These APIs can be used with all classes.

API Description
getAdmin Acquires the administration information.
Administration information
getLocation Acquires the installation location information.

Reconnection setConnectionEventListener Registers the event listener registration method.

Discovery class
Controls the device discovery function.

API Description
Start start Starts device search.

Stop stop Stops device search.

Epos2Exception class
Acquires the error status when an exception occurs.

API Description
Acquires the error status when an exception is
Error status acquisition getErrorStatus
thrown.

51
Chapter 3 API Reference - List of ePOS SDK API

Log class
Controls the log output function.

API Description
Log setLogSettings Sets the log output function.

Version acquisition SdkVersion Acquires the Epson ePOS SDK version.

EasySelect class
EasySelect class and EasySelectInfo class offer API commands and member variables for selecting printers by
using NFC tags or QR codes.
EasySelect class is for analyzing NFC tags and QR codes.

API Description
Analyzing of NFC tags parseNFC Analyzes NFC tags data.

Analyzing of QR codes parseQR Analyzes QR codes data.

Creates QR code data that can be analyzed by


Creation of QR codes createQR
parseQR.

EasySelectInfo class
This class is for storing data analyzed by parseNFC or parseQR. Specify the stored information in connect API to
connect with the printer.

Member variables Description


Printer type deviceType Stores printer type information.

Printer name printerName Stores a printer name.

MAC address/BD address macAddress Stores a MAC address or a BD address.

52
Chapter 3 API Reference - Printer class

Printer class

Printer
Initializes the Printer class.

Syntax
public Printer(int printerSeries, int lang, Context context)
throws Epos2Exception
Parameter
printerSeries
Specifies the target printer.

Value Description

Printer.TM_M10 TM-m10

Printer.TM_M30 TM-m30

TM-m30II, TM-m30II-H, TM-m30II-NT, TM-m30II-S,


Printer.TM_M30II
TM-m30II-SL

Printer.TM_M50 TM-m50

Printer.TM_P20 TM-P20

Printer.TM_P60 TM-P60 (Receipt/Peeler)

Printer.TM_P60II TM-P60II (Receipt/Peeler)

Printer.TM_P80 TM-P80

TM-T20, TM-T20II, TM-T20II-i, TM-T20III, TM-T20IIIL,


Printer.TM_T20
TM-T20X

Printer.TM_T60 TM-T60

TM-T70, TM-T70-i, TM-T70II, TM-T70II-DT, TM-T70II-


Printer.TM_T70
DT2

Printer.TM_T81 TM-T81II, TM-T81III

TM-T82, TM-T82II, TM-T82II-i, TM-T82III, TM-T82IIIL.


Printer.TM_T82
TM-T82X

Printer.TM_T83 TM-T83II, TM-T83II-i

Printer.TM_T83III TM-T83III

TM-T88IV, TM-T88V, TM-T88VI, TM-T88V-i, TM-T88VI-


Printer.TM_T88
iHUB, TM-T88V-DT, TM-T88VI-DT2

Printer.TM_T88VII TM-T88VII

Printer.TM_T90 TM-T90

53
Chapter 3 API Reference - Printer class

Value Description

Printer.TM_T100 TM-T100

Printer.TM_U220 TM-U220, TM-U220-i

Printer.TM_U330 TM-U330

Printer.TM_L90 TM-L90

Printer.TM_L90LFC TM-L90 Liner-Free Label Printer Model

Printer.TM_H6000 TM-H6000IV, TM-H6000V, TM-H6000IV-DT

Printer.EU_M30 EU-m30

lang
Specifies the language of the printer.

Value Description

Printer.MODEL_ANK ANK model

Printer.MODEL_CHINESE Simplified Chinese model

Printer.MODEL_TAIWAN Taiwan model

Printer.MODEL_KOREAN Korean model

Printer.MODEL_THAI Thai model

Printer.MODEL_SOUTHASIA South Asian model

context
Specifies the application context.
Null can be specified when the log output function is not used and the printer is not connected via USB.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

A model name or language not supported was speci-


ERR_UNSUPPORTED
fied.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

54
Chapter 3 API Reference - Printer class

When using it with multiple printers connected, make sure to generate a dedicated instance for each
printer.

55
Chapter 3 API Reference - Printer class

connect
Starts communication with the printer.

Syntax
Public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.

• TM Printer Models
<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• Customer Display Models


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

To connect to the printer via SSL/TLS communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

56
Chapter 3 API Reference - Printer class

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCPS:192.168.192.168[local_pri


nter]"
Wi-Fi/Ethernet "TCPS" • MAC address
• Host name

• TM Printer + DM-D + barcode scanner model/


TM Printer + barcode scanner model
To connect via Wi-Fi/Ethernet network communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_prin


ter]"
Wi-Fi/Ethernet "TCP" • MAC address
• Host name

The device ID is fixed as [local_printer].

To connect via Bluetooth or USB, specify using the following syntax.


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• POS Terminal Model


<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_prin


• "TCP" ter]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

57
Chapter 3 API Reference - Printer class

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Print.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ When communication with the printer is no longer necessary, be sure to call disconnect to terminate it.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ The printer status is returned to the event registered with the Printer class.
For details, refer to Chapter 2 "Programming Flow" and Chapter 6 "To use the same printer from multiple
mobile devices."
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ If you are using DHCP to assign the IP address of the printer, specify the MAC address or host name of the
printer as the identifier.

58
Chapter 3 API Reference - Printer class

❏ If you specify the host name of the printer as the identifier, use in the environment where it can be found
by the DNS server.
❏ When connecting through the USB, the identifiers that can be specified differ depending on the shape of
the USB connector.
When the identifier is omitted, Android OS connects with the USB device found first.
When the Android terminal is set to the developer mode, you may not be able to connect through USB-
A - Device Charging.

Shape of the USB connector


Identifier
USB-B USB-A - Device Charging

Device node ✔ -

USB Serial number - ✔

Omitted ✔ ✔

❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

59
Chapter 3 API Reference - Printer class

disconnect
Ends communication with the printer.

Syntax
Public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing.

60
Chapter 3 API Reference - Printer class

startMonitor
Enables printer status event notification.
Acquires and updates the printer status at the interval specified with the interval property and notifies it of the
listener registration method registered by setStatusChangeEventListener.

Syntax
public void startMonitor() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ Use this API after starting a communication with the printer (after executing the connect API).
❏ During ESC/POS control, any ASB information items which have been changed during the update iinter-
val specified by the interval property are reported.
During ePOS-Device XML control, the ASB information at the time of update is reported.

61
Chapter 3 API Reference - Printer class

stopMonitor
Disables status events.

Syntax
public void stopMonitor() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


ERR_ILLEGAL
been started.

62
Chapter 3 API Reference - Printer class

getStatus
Acquires the current status information.

Syntax
public PrinterStatusInfo getStatus ()
Return value
The current status is returned in the PrinterStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: Printer.TRUE Connected

Connection status Printer.FALSE Status is unknown.

Printer.TRUE Online
online:
Printer.FALSE Offline
Online status
Printer.UNKNOWN Status is unknown.

Printer.TRUE Cover is open.


coverOpen:
Printer.FALSE Cover is closed.
Cover status
Printer.UNKNOWN Status is unknown.

Printer.PAPER_OK Paper remains.

paper: Printer.PAPER_NEAR_END Paper is running out.

Paper status Printer.PAPER_EMPTY Paper has run out.

Printer.UNKNOWN Status is unknown.

Printer.TRUE Paper feed in progress


paperFeed:
Printer.FALSE Stopped
Paper feed
Printer.UNKNOWN Status is unknown.

Printer.SWITCH_ON Pressed
panelSwitch:
Printer.SWITCH_OFF Not pressed
Panel switch (Feed button) status
Printer.UNKNOWN Status is unknown.

Printer.DRAWER_HIGH High
drawer:
Offline status due to the battery Printer.DRAWER_LOW Low
level (Mobile models)
Printer.UNKNOWN Status is unknown.

63
Chapter 3 API Reference - Printer class

Printer status Status Description

Printer.DRAWER_HIGH High
drawer:
Drawer kick connector pin No.3 sta- Printer.DRAWER_LOW Low
tus (except for the Mobile models)
Printer.UNKNOWN Status is unknown.

Printer.NO_ERR Normal

Printer.MECHANICAL_ERR Mechanical error occurred.

errorStatus: Printer.AUTOCUTTER_ERR Auto cutter error occurred.

Error status Printer.UNRECOVER_ERR Unrecoverable error occurred.

Printer.AUTORECOVER_ERR Automatic recovery error occurred.

Printer.UNKNOWN Status is unknown.

Printer.HEAD OVERHEAT Head overheat error

Printer.MOTOR OVERHEAT Motor driver IC overheat error

autoRecoverError: Printer.BATTERY OVERHEAT Battery overheat error

Automatic recovery error status Printer.WRONG PAPER Paper error

Printer.COVER_OPEN Cover is open.

Printer.UNKNOWN Unknown status

Printer.TRUE Sounding (Applicable printer only)


buzzer:
Printer.FALSE Stopped (Applicable printer only)
Buzzer sound status
Printer.UNKNOWN Status is unknown.

Printer.TRUE Connected
adapter:
Printer.FALSE Disconnected
AC adapter connection status
Printer.UNKNOWN Status is unknown.

Printer.BATTERY_LEVEL_6 Remaining battery capacity 6

Printer.BATTERY_LEVEL_5 Remaining battery capacity 5

Printer.BATTERY_LEVEL_4 Remaining battery capacity 4

Printer.BATTERY_LEVEL_3 Remaining battery capacity 3


batteryLevel:
Printer.BATTERY_LEVEL_2 Remaining battery capacity 2
Remaining battery capacity
Remaining battery capacity 1
Printer.BATTERY_LEVEL_1
(almost run out)

Remaining battery capacity 0 (run


Printer.BATTERY_LEVEL_0
out)

Printer.UNKNOWN Status is unknown.

64
Chapter 3 API Reference - Printer class

Printer status Status Description

Printer.REMOVAL_WAIT_PAPER Waiting for removal.


removalWaiting:
Printer.REMOVAL_WAIT_NONE Not waiting for removal.
Label removal wait status
Printer.UNKNOWN Status is unknown.

Printer.HIGH_VOLTAGE_ERR High voltage error


unrecoverError:
Printer.LOW_VOLTAGE_ERR Low voltage error
Unrecoverable error status
Printer.UNKNOWN Status is unknown.

Supplementary explanation
❏ If this API is called while communication is not available, printer states other than "connection" will be
set to "Printer.UNKNOWN."
❏ The status object is set to the status at the timing of execution of this API and will not be updated.

65
Chapter 3 API Reference - Printer class

sendData
Sends the print command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.
Make sure not to use this API repeatedly without getting the result in the callback.
This API sends data buffered by an add-type API (e.g., addText).

Syntax
public void sendData (int timeout) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000* Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

* For the system configurations listed below, specify an integer in the range of 5000 to 300000.
❏ Customer Display Models (SSL/TLS communication only)
❏ TM Printer + DM-D + barcode scanner model
❏ POS Terminal Model

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

The control commands have not been buffered.


ERR_ILLEGAL This API was called while no communication had
been started.

Supplementary explanation
For Bluetooth connection, the offline status may not be detected and a timeout error may occur.
Refer to Chapter 6 "To use the same printer from multiple mobile devices" for details.

66
Chapter 3 API Reference - Printer class

beginTransaction
Starts a transaction.
A transaction represents a single printing task such as printing a single sheet of receipt or coupon.
After this API is called, data until the transaction is terminated by endTransaction will be regarded as a single
printing task.

Syntax
public void beginTransaction() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

This API was called while no communication had


been started.
ERR_ILLEGAL
Another transaction had been already started by this
function.

ERR_FAILURE An unknown error occurred.

67
Chapter 3 API Reference - Printer class

endTransaction
Ends a transaction.
A transaction represents a single printing task such as printing a single sheet of receipt or coupon.
After beginTransaction is called, data until the transaction is terminated by this API will be regarded as a single
printing task.

Syntax
public void endTransaction() throws Eswv2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

This API was called while no communication had


been started.
ERR_ILLEGAL
This API was called while no transaction had been
started.

ERR_FAILURE An unknown error occurred.

68
Chapter 3 API Reference - Printer class

requestPrintJobStatus
Acquires the print result for the specified print job ID.

Syntax
public void requestPrintJobStatus (String printJobId) throws
Epos2Exception
Parameter
printJobId
Specifies the print job ID.
Alphanumeric characters, underscore, hyphen, and period in 1 to 30 digits can be used.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_CONNECT Communication error

ERR_PARAM An invalid parameter was passed.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ The result of this API is notified to the listener registration method set by the setReceiveEventListener
API of the Printer class.
❏ When multiple print processes were performed with the same print job ID, the status of the latest print
job is acquired.

69
Chapter 3 API Reference - Printer class

clearCommandBuffer
Clears the command buffer.
The contents buffered in the command buffer are retained until this API is called.

Syntax
public void clearCommandBuffer()

70
Chapter 3 API Reference - Printer class

addTextAlign
Adds text alignment setting to the command buffer.

Syntax
public void addTextAlign(int align) throws Epos2Exception
Parameter
align
Specifies alignment.

Value Description

Printer.ALIGN_LEFT (default) Left alignment

Printer.ALIGN_CENTER Center alignment

Printer.ALIGN_RIGHT Right alignment

Printer.PARAM_DEFAULT Specifies the default value (left alignment).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ Setting of this API is also applied to the barcode/2D symbol/raster image/NV logo.
❏ When specifying alignment in the page mode, use addPagePosition instead of this API.

71
Chapter 3 API Reference - Printer class

addLineSpace
Adds line spacing setting to the command buffer.

Syntax
public void addLineSpace(int linespc) throws Epos2Exception
Parameter
linespc
Specifies the line spacing (in dots).

Value Description

Integer from 0 to 255 Line spacing (in dots)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
If the line spacing for a single line is set smaller than the print character size, paper may be fed for a larger
quantity than the set amount to ensure proper printing.

72
Chapter 3 API Reference - Printer class

addTextRotate
Adds text rotation setting to the command buffer.

Syntax
public void addTextRotate(int rotate) throws Epos2Exception
Parameter
rotate
Enables or disables text rotation.

Value Description

Printer.TRUE Specifies text rotation.

Printer.FALSE (default) Disables text rotation.

Printer.PARAM_DEFAULT Specifies the default value (text rotation disabled).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ Setting of this API is also applied to the barcode/2D symbol.
❏ When specifying text rotation in the page mode, use addPageDirection instead of this API.

73
Chapter 3 API Reference - Printer class

addText
Adds a character print command to the command buffer.

Syntax
public void addText(String data) throws Epos2Exception
Parameter
data
Specifies the string to print.
Use the following escape sequences for a horizontal tab and line feed.

String Description

\t Horizontal tab (HT)

\h Line feed (LF)

\\ Back slash

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ To print data other than text after printing text, feed a line or page.
A line which does not end with a line feed will be discarded as unfixed data by the next sendData.
❏ In the page mode, text is printed from the current print position with the base line dot of the characters
as the standard.

74
Chapter 3 API Reference - Printer class

addTextLang
Adds language setting to the command buffer.
A text string specified by the addText API is encoded according to the language specified by this API.

Syntax
public void addTextLang(int lang) throws Epos2Exception
Parameter
lang
Specifies the target language.

Value Description

Printer.LANG_EN (default) English (ANK specification)

Printer.LANG_JA Japanese

Printer.LANG_ZH_CN Simplified Chinese

Printer.LANG_ZH_TW Traditional Chinese

Printer.LANG_KO Korean

Printer.LANG_TH Thai (South Asian specification)

Printer.LANG_VI Vietnamese (South Asian specification)

Printer.LANG_MULTI Multiple languages (UTF-8)

Printer.PARAM_DEFAULT Specifies the default value (English).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API is called before the addText API.
❏ Use this API at the top of each print job.
❏ Available languages differ depending on character specifications of the printer. For details, see Technical
Reference Guide of the printer.

75
Chapter 3 API Reference - Printer class

addTextFont
Adds character font setting to the command buffer.

Syntax
public void addTextFont(int font) throws Epos2Exception
Parameter
font
Specifies the font.

Value Description

Printer.FONT_A (default) Font A

Printer.FONT_B Font B

Printer.FONT_C Font C

Printer.FONT_D Font D

Printer.FONT_E Font E

Printer.PARAM_DEFAULT Specifies the default value (font A).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

76
Chapter 3 API Reference - Printer class

addTextSmooth
Adds smoothing setting to the command buffer.

Syntax
public void addTextSmooth(int smooth) throws
Epos2Exception
Parameter
smooth
Enables or disables smoothing.

Value Description

Printer.TRUE Enables smoothing.

Printer.FALSE (default) Disables smoothing.

Printer.PARAM_DEFAULT Specifies the default value (smoothing disabled).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

77
Chapter 3 API Reference - Printer class

addTextSize
Adds character scaling factor setting to the command buffer.

Syntax
public void addTextSize(int width, int height) throws
Epos2Exception
Parameter
width
Specifies the horizontal scaling of characters.

Value Description

Specifies the horizontal scaling factor rate (default:


Integer from 1 to 8
1).

Printer.PARAM_DEFAULT Specifies the default value (1).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

height
Specifies the vertical scaling of characters.

Value Description

Integer from 1 to 8 Specifies the vertical scaling factor rate (default: 1).

Printer.PARAM_DEFAULT Specifies the default value (1).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ If all the parameters are set to "Printer.PARAM_UNSPECIFIED," ERR_PARAM will be returned.
❏ For slip, endorsement, or validation printing, an integer from 1 to 2 can be set for the width and height.

78
Chapter 3 API Reference - Printer class

addTextStyle
Adds character style setting to the command buffer.

Syntax
public void addTextStyle(int reverse, int ul, int em, int color)
throws Epos2Exception
Parameter
reverse
Enables or disables the reverse style.

Value Description

Printer.TRUE Enables the reverse style.

Printer.FALSE (default) Disables the reverse style.

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Printer.PARAM_DEFAULT Specifies the default value (reverse style disabled).

ul
Enables or disables the underscore style.

Value Description

Printer.TRUE Enables the underscore style.

Printer.FALSE (default) Disables the underscore style.

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Specifies the default value (underscore style dis-


Printer.PARAM_DEFAULT
abled).

em
Enables or disables the bold style..

Value Description

Printer.TRUE Enables the bold style.

Printer.FALSE (default) Disables the bold style.

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Printer.PARAM_DEFAULT Specifies the default value (bold style disabled).

color
Specifies the color.

Value Description

Printer.COLOR_NONE No printing

79
Chapter 3 API Reference - Printer class

Value Description

Printer.COLOR_1 (default) First color

Printer.COLOR_2 Second color

Printer.COLOR_3 Third color

Printer.COLOR_4 Fourth color

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Printer.PARAM_DEFAULT Specifies the default value (first color).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ If all the parameters are set to "Printer.PARAM_UNSPECIFIED," ERR_PARAM will be returned.

80
Chapter 3 API Reference - Printer class

addHPosition
Adds horizontal character print start position to the command buffer.

Syntax
public void addHPosition(int x) throws Epos2Exception
Parameter
x
Specifies the horizontal print start position in dots.

Value Description

Integer from 0 to 65535 Horizontal print start position (in dots)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Calling this API causes the printer positioned at "other than the beginning of the line."
This is also true even if 0 is set to "X."
❏ After executing this API, addTextAlign and addTextRotate cannot be used.
❏ Setting of this API is also applied to the barcode/2D symbol/raster image/NV logo.
❏ The setting of this API is applied to each line (Or to each barcode, 2D symbol, raster image, or NV logo).
If you want to apply the setting to multiple lines, set this API to each of the lines.

81
Chapter 3 API Reference - Printer class

addFeedUnit
Adds a paper-feed-by-dot command to the command buffer.

Syntax
public void addFeedUnit(int unit) throws Epos2Exception
Parameter
unit
Specifies the paper feed amount (in dots).

Value Description

Integer from 0 to 255 Paper feed amount (in dots)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
Calling this API causes the printer positioned at "the beginning of the line."

82
Chapter 3 API Reference - Printer class

addFeedLine
Adds a paper-feed-by-line command to the command buffer.

Syntax
public void addFeedLine(int line) throws Epos2Exception
Parameter
line
Specifies the paper feed amount (in lines).

Value Description

Integer from 0 to 255 Paper feed amount (in lines)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
Calling this API causes the printer positioned at "the beginning of the line."

83
Chapter 3 API Reference - Printer class

addImage
Adds a raster image print command to the command buffer.
Prints Android.graphics.Bitmap class graphics.
A specified area of Android.graphics.Bitmap class graphics is binarized according to the mode, halftone, and
brightness parameters and converted into a raster image.
The converted image is compressed or not compressed before transmission according to the compress
parameter value.
One pixel of an image corresponds to one dot of the printer. When a transparent color is contained in the image,
the background of the image is assumed to be white.

Syntax
public void addImage(Bitmap data, int x, int y, int width, int
height, int color, int mode, int halftone, double brightness, int
compress) throws Epos2Exception
Parameter
data
Specifies an instance of the android.graphics.Bitmap class.

x
Specifies the horizontal start position of the print area (in pixels).

Value Description

Integer from 0 to 65534 Horizontal start position of the print area (in pixels)

y
Specifies the vertical start position of the print area (in pixels).

Value Description

Integer from 0 to 65534 Vertical start position of the print area (in pixels)

width
Specifies the width of the print area (in pixels).

Value Description

Integer from 1 to 65535 Width of the print area (in pixels).

height
Specifies the height of the print area (in pixels).

Value Description

Integer from 1 to 65535 Height of the print area (in pixels).

84
Chapter 3 API Reference - Printer class

color
Specifies the color.

Value Description

Printer.COLOR_NONE No printing

Printer.COLOR_1 First color

Printer.COLOR_2 Second color

Printer.COLOR_3 Third color

Printer.COLOR_4 Fourth color

Printer.PARAM_DEFAULT Specifies the default value (first color).

mode
Specifies the color mode.

Value Description

Printer.MODE_MONO Monochrome (2 scales)

Printer.MODE_GRAY16 Multi-gradation (16 scales)

Printer. MODE_MONO_HIGH_DENSITY Monochrome (2 scales), double density

Printer.PARAM_DEFAULT Specifies the default (monochrome (2 scales)).

halftone
Specifies the halftone processing method.

Value Description

Printer.HALFTONE_DITHER Dithering (appropriate for printing graphics only)

Error diffusion (appropriate for printing text and


Printer.HALFTONE_ERROR_DIFFUSION
graphics)

Printer.HALFTONE_THRESHOLD Threshold (appropriate for printing text only)

Printer.PARAM_DEFAULT Specifies the default (dithering).

Effective for the monochrome (2 scales) color mode only.

brightness
Specifies the brightness compensation value.

Value Description

Real number from 0.1 to 10.0 Brightness compensation (gamma correction) value

Printer.PARAM_DEFAULT Default (1.0)

When a value other than 1.0 is specified for the brightness compensation value, processing gets slower.

85
Chapter 3 API Reference - Printer class

compress
Enables or disables compression.
Compressing print images can prevent white banding or streaks from occurring on printed images.
This works well when connecting with the printer using Bluetooth.

Value Description

Printer.COMPRESS_DEFLATE Compresses the image.

Printer.COMPRESS_NONE Does not compress the image.

Automatically chooses to or not to compress the


Printer.COMPRESS_AUTO
image internally.

Default
Printer.PARAM_DEFAULT (automatically chooses to or not to compress the
image internally)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ If the area specified by x/y and width/height parameters does not fit within the image size specified by
data parameter, ERR_PARAM will be returned as an exception.
❏ Compress can only be specified with the Bluetooth model of the following printers. For other printers,
specify Printer.COMPRESS_AUTO.

Model Firmware version

TM-m10 No restriction

TM-m30 No restriction

TM-m30II/TM-m30II-H/TM-m30II-NT/TM-m30II-S/
No restriction
TM-m30II-SL/TM-m50

TM-P20 No restriction

TM-P60II (Receipt) 5.14 ESC/POS or later

TM-P60II (Peeler) 6.14 ESC/POS or later

TM-P80 1.02 ESC/POS or later

TM-P80AC 2.01 ESC/POS or later

86
Chapter 3 API Reference - Printer class

Model Firmware version

TM-T20II No restriction

TM-T20III No restriction

TM-T70II No restriction

TM-T82III No restriction

TM-T88V No restriction

TM-T88VI No restriction

❏ Printing may get slower if a transparent image is printed.


❏ The multi-gradation and the compression of image data are not supported in the page mode. If you set
those in the page mode, nothing will be printed.
❏ Set an image size appropriate for the printer. If you set to print a large image, the API commands will be
succeeded, but the printer may print nothing.
❏ Even if the size of an image is printable, the ERR_MEMORY error may occur depending on the Android
device specification. In such case, reduce the image size.

87
Chapter 3 API Reference - Printer class

addLogo
Adds a NV logo print command to the command buffer.
Prints the logo registered in the NV memory of the printer.

Syntax
public void addLogo(int key1, int key2) throws
Epos2Exception
Parameter
key1
Specifies the key code 1 of the NV logo.

Value Description

Integer from 1 to 255 Key code 1 of the NV logo

key2
Specifies the key code 2 of the NV logo.

Value Description

Integer from 1 to 255 Key code 2 of the NV logo

Specify this for the printers that do not support key


Printer.PARAM_DEFAULT
code 2.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ For how to register the NV logo, refer to the Technical Reference Guide of the printer.
❏ The page mode does not support multi-gradation printing. Multi-gradation graphics can be printed in
the standard mode only.
❏ The NV logo specified by this API is printed with the color setting specified by addTextStyle buffered in
advance.
❏ TM-U220 and TM-U330 use only the key1 parameter, however, you need to set "Printer.PARAM_DE-
FAULT" as the key2 parameter for those printers since an empty key2 parameter causes an error.

88
Chapter 3 API Reference - Printer class

addBarcode
Adds a barcode print command to the command buffer.

Syntax
public void addBarcode(String data, int type, int hri, int font,
int width, int height) throws Epos2Exception
Parameter
data
Specifies barcode data as a text string.
Specify a string in accordance with the standard of the barcode specified in type.

Type Description

If an 11-digit figure is specified, the check digit is automatically appended.


UPC-A If a 12-digit figure is specified, the 12th digit is used as the check digit but verification is
not performed.

Specify 0 in the first digit.


Specify the manufacturer code in the 2nd to 6th digits.
Specify the item code in right justification in the 7th to 11th digits.
The number of digits of the item code depends on the manufacturer code.
UPC-E
Specify 0 in each unused data.
If an 11-digit figure is specified, the check digit is automatically appended.
If a 12-digit figure is specified, the 12th digit is used as the check digit but verification is
not performed.

EAN13 If an 12-digit figure is specified, the check digit is automatically appended.


If a 13-digit figure is specified, the 13th digit is used as the check digit but verification is
JAN13 not performed.

EAN8 If an 7-digit figure is specified, the check digit is automatically appended.


If an 8-digit figure is specified, the 8th digit is used as the check digit but verification is
JAN8 not performed.

If the first character is * , this character is processed as the start character.


CODE39
If it is not , the start character is automatically added.

The start and stop codes are automatically added.


ITF
Addition and verification of the check digit are not performed.

Specify the start character ((A to D, a to d).


CODABAR Specify the stop character ((A to D, a to d).
Addition and verification of the check digit are not performed.

The start and stop characters are automatically added.


CODE93
The check digit is automatically calculated and added.

89
Chapter 3 API Reference - Printer class

Type Description

Specify the start character (CODE A, CODE B, CODE C).


The stop character is automatically added.
The check digit is automatically calculated and added.
To encode the following characters, specify the corresponding 2-digit code starting
with { :
• FNC1: {1
• FNC2: {2
• FNC3: {3
CODE128
• FNC4: {4
• CODE A: {A
• CODE B: {B
• CODE C: {C
• SHIFT: {S
• {: {{
When specifying CODE C, specify the barcode data as the control code of the escape
sequence.

The start character, check digit, and stop character are automatically added.
The character string added to make the overall width of the CODE128 symbol as mini-
mum is automatically converted. In this function, there is no need to specify the code
set, and the barcode is printed simply by entering the data to be converted to symbols.
Example) When entering numbers: "123", etc.
CODE128 auto
When entering alphabets: "ABCabc", etc.
Data from 0 to 255 (control codes and character codes) can be specified.
Since the overall width changes automatically, use this function after confirming that
the barcode fits into the print area and is printed without any problem.
When using FNC1, etc., use CODE128 rather than CODE128 auto.

The start character, FNC1, check digit, and stop characters are automatically added.
However, FNC1 used as a data separator is not added.
To automatically calculate and add the application ID (AI) and the following check digit,
specify "*" at the check digit position.
The application ID (AI) can be put in parentheses.
The parentheses are used as print characters for HRI and not encoded as data.
A blank space can be inserted between the application ID (AI) and data.
The blank space is used as print characters for HRI and not encoded as data.
GS1-128
To encode the following characters, specify the corresponding 2-digit code starting
with { :
• FNC1: {1
• FNC3: {3
• (: {(
• ): {}
• FNC1: {1
• {: {{

90
Chapter 3 API Reference - Printer class

Type Description

GS1 DataBar Omnidirec-


tional
Specify a 13-digit product ID (GTIN) excluding the application ID (AI) and check digit.
GS1 DataBar Truncated

GS1 DataBar Limited

The application ID (AI) can be put in parentheses.


The parentheses are used as print characters for HRI and not encoded as data.
To encode the following characters, specify the corresponding 2-digit code starting
GS1 DataBar Expanded with { :
• FNC1: {1
• (: {(
• ): {}

When specifying binary data which cannot be represented as a string, use the following escape sequences.

String Description

\xnn Control code (set nn in hexadecimal)

\\ Back slash

type
Specifies the barcode type.

Value Description

Printer.BARCODE_UPC_A UPC-A

Printer.BARCODE_UPC_E UPC-E

Printer.BARCODE_EAN13 EAN13

Printer.BARCODE_JAN13 JAN13

Printer.BARCODE_EAN8 EAN8

Printer.BARCODE_JAN8 JAN8

Printer.BARCODE_CODE39 CODE39

Printer.BARCODE_ITF ITF

Printer.BARCODE_CODABAR CODABAR

Printer.BARCODE_CODE93 CODE93

Printer.BARCODE_CODE128 CODE128

Printer.BARCODE_CODE128_AUTO CODE128_AUTO

Printer.BARCODE_GS1_128 GS1-128

Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL GS1 DataBar Omnidirectional

Printer.BARCODE_GS1_DATABAR_TRUNCATED GS1 DataBar Truncated

91
Chapter 3 API Reference - Printer class

Value Description

Printer.BARCODE_GS1_DATABAR_LIMITED GS1 DataBar Limited

Printer.BARCODE_GS1_DATABAR_EXPANDED GS1 DataBar Expanded

hri
Specifies the HRI position.

Value Description

Printer.HRI_NONE (default) No printing.

Printer.HRI_ABOVE Above the barcode

Printer.HRI_BELOW Below the barcode

Printer.HRI_BOTH Both above and below the barcode

Printer.PARAM_DEFAULT Specifies the default value (no printing).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

font
Specifies the HRI font.

Value Description

Printer.FONT_A (default) Font A

Printer.FONT_B Font B

Printer.FONT_C Font C

Printer.FONT_D Font D

Printer.FONT_E Font E

Printer.PARAM_DEFAULT Specifies the default value (font A).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

width
Specifies the width of a single module in dots.

Value Description

Integer from 2 to 6 Width of a single module (in dots)

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

height
Specifies the height of the barcode in dots.

Value Description

Integer from 1 to 255 Height of the barcode (in dots)

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

92
Chapter 3 API Reference - Printer class

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line."
❏ When the barcode data specified in data does not conform to the barcode type specified in type, an
error will not be returned as an exception and the barcode will not be printed.
❏ The "CODE 128 auto" type of barcode can be specified when the printer is TM-m30II, TM-m30II-H, TM-
m30II-NT, TMm30II-S, or TM-m50.

93
Chapter 3 API Reference - Printer class

addSymbol
Adds a 2D symbol print command to the command buffer.

Syntax
public void addSymbol(String data, int type, int level, int
width, int height, int size) throws Epos2Exception
Parameter
data
Specifies 2D symbol data as a text string.
Specify a string in accordance with the standard of the 2D symbol specified in type.

Type Description

Standard PDF417 Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.

Truncated PDF417 The maximum number of code words in the data area is 928, the maximum number of
code words in a single stage is 30, and the maximum number of stages is 90.

QR Code Model 1 Converts the string into JIS, processes the escape sequence(s), and encodes the data by
choosing the data type from the following:
QR Code Model 2
• Figure: 0 to 9
• Alphanumeric: 0 to 9, A to Z, space, $, %, *, +, -, ., /, :
QR Code Micro • Kanji: Characters which can be represented with Shift JIS codes
• 8-bit byte data: 0x00 to 0xff

MaxiCode Mode 2 Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.
MaxiCode Mode 3
In Mode 2 or 3, if the first data is []>\x1e01\x1dyy ("yy" is a 2-digit figure), this is pro-
MaxiCode Mode 4 cessed as the message header and the second and succeeding data sequence is pro-
cessed as the primary message.
MaxiCode Mode 5
Otherwise, the primary message starts with the fist data.
For the mode 2, specify the primary message in the following format:
• Zip code (1- to 9-digit figure) GS:(\x1d)
• ISO country code (1- to 3-digit figure) GS:(\x1d)
• Service class code (1- to 3-digit figure)
MaxiCode Mode 6
For the mode 3, specify the primary message in the following format:
• Zip code (data which can be converted with 1 to 6 code sets A) GS (\x1d)
• ISO country code (1- to 3-digit figure) GS (\x1d)
• Service class code (1- to 3-digit figure)

GS1 DataBar Stacked Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.
GS1 DataBar Stacked
Omnidirectional Specify a 13-digit product ID (GTIN) excluding the application ID (AI) and check digit.

94
Chapter 3 API Reference - Printer class

Type Description

Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.
The application ID (AI) can be put in parentheses.
The parentheses are used as print characters for HRI and not encoded as data.
GS1 DataBar Expanded
To encode the following characters, specify the corresponding 2-digit code starting
Stacked
with { :
• FNC1: {1
• (: {(
• ): }{)

Converts the string into UTF-8, processes the escape sequence(s), and encodes the
Aztec Code
data.

Converts the string into UTF-8, processes the escape sequence(s), and encodes the
DataMatrix
data.

When specifying binary data which cannot be represented as a string, use the following escape sequences.

String Description

\xnn Control code (set nn in hexadecimal)

\\ Back slash

type
Specifies the 2D symbol type.

Value Description

Printer.SYMBOL_PDF417_STANDARD Standard PDF417

Printer.SYMBOL_PDF417_TRUNCATED Truncated PDF417

Printer.SYMBOL_QRCODE_MODEL_1 QR Code Model 1

Printer.SYMBOL_QRCODE_MODEL_2 QR Code Model 2

Printer.SYMBOL_QRCODE_MICRO QR Code Micro

Printer.SYMBOL_MAXICODE_MODE_2 MaxiCode Mode 2

Printer.SYMBOL_MAXICODE_MODE_3 MaxiCode Mode 3

Printer.SYMBOL_MAXICODE_MODE_4 MaxiCode Mode 4

Printer.SYMBOL_MAXICODE_MODE_5 MaxiCode Mode 5

Printer.SYMBOL_MAXICODE_MODE_6 MaxiCode Mode 6

Printer.SYMBOL_GS1_DATABAR_STACKED GS1 DataBar Stacked

Printer.SYMBOL_GS1_DATABAR_STACKED_
GS1 DataBar Stacked Omnidirectional
OMNIDIRECTIONAL

Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED GS1 DataBar Expanded Stacked

Printer.SYMBOL_AZTECCODE_FULLRANGE Aztec Code Full-Range mode

95
Chapter 3 API Reference - Printer class

Value Description

Printer.SYMBOL_AZTECCODE_COMPACT Aztec Code Compact mode

Printer.SYMBOL_DATAMATRIX_SQUARE DataMatrix Square

Printer.SYMBOL_DATAMATRIX_RECTANGLE_8 DataMatrix Rectangle, 8 lines

Printer.SYMBOL_DATAMATRIX_RECTANGLE_12 DataMatrix Rectangle, 12 lines

Printer.SYMBOL_DATAMATRIX_RECTANGLE_16 DataMatrix Rectangle, 16 lines

level
Specifies the error correction level.
Specify a value in accordance with the 2D symbol type.
Specify "PARAM_DEFAULT" for MaxiCode, 2D GS1 DataBar, and DataMatrix.
❏ PDF417

Value Description

Printer.LEVEL_0 Error correction level 0

Printer.LEVEL_1 Error correction level 1

Printer.LEVEL_2 Error correction level 2

Printer.LEVEL_3 Error correction level 3

Printer.LEVEL_4 Error correction level 4

Printer.LEVEL_5 Error correction level 5

Printer.LEVEL_6 Error correction level 6

Printer.LEVEL_7 Error correction level 7

Printer.LEVEL_8 Error correction level 8

Printer. PARAM_DEFAULT Specifies the default value (error correction level 1).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

❏ QR Code

Value Description

Printer.LEVEL_L Error correction level L

Printer.LEVEL_M Error correction level M

Printer.LEVEL_Q Error correction level Q

Printer.LEVEL_H Error correction level H

Printer. PARAM_DEFAULT Specifies the default value (error correction level M).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

96
Chapter 3 API Reference - Printer class

❏ Aztec Code

Value Description

Integer from 5 to 95 Error correction level (in percents)

Printer. PARAM_DEFAULT Specifies the default value (error correction level 23).

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

width
Specifies the module width.
An integer from 1 to 255 can be specified.
When "Printer.PARAM_UNSPECIFIED" is specified, the current setting is retained.
The range differs depending on the 2D symbol type.

2D symbol type Valid value Default value

PDF417 2 to 8 3

QR Code 3 to 16 3

MaxiCode 1 to 255 (Ignored)

2D GS1 DataBar 2 to 8 2

Aztec Code 2 to 16 3

DataMatrix 2 to 16 3

height
Specifies the module height.
An integer from 1 to 255 can be specified.
When "Printer.PARAM_UNSPECIFIED" is specified, the current setting is retained.
The range differs depending on the 2D symbol type.

2D symbol type Valid value Default value

2 to 8
PDF417 3
(Scaling factor for width)

QR Code

MaxiCode

2D GS1 DataBar 1 to 255 (Ignored)

Aztec Code

DataMatrix

97
Chapter 3 API Reference - Printer class

size
Specifies the maximum size of the 2D symbol.
An integer from 0 to 65535 can be specified.
When "Printer.PARAM_UNSPECIFIED" is specified, the current setting is retained.
The range differs depending on the 2D symbol type.

2D symbol type Default value Description

PDF417 0 (auto) Specifies the number of code words per stage.

QR Code 0 to 65535 (Ignored)

MaxiCode 0 to 65535 (Ignored)

Specifies the maximum width of the 2D symbol (106 or


2D GS1 Expanded Stacked 0 (auto)
more).
DataBar
Other 0 to 65535 (Ignored)

Aztec Code 0 to 65535 (Ignored)

DataMatrix 0 to 65535 (Ignored)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use this API at the "beginning of a line."
❏ When the 2D symbol data specified in data does not conform to the 2D symbol type specified in type, an
error will not be returned as an exception and the 2D symbol will not be printed.
❏ During ESC/POS control, specifying values outside the valid ranges for the width and height parameters
results in default value printing.
❏ During ePOS-Device XML control, specifying values outside the valid ranges for the width and height
parameters causes sendData to generate an exception with ERR_FAILURE.

98
Chapter 3 API Reference - Printer class

addHLine
Adds a horizontal ruled line print command to the command buffer.
Draws a horizontal ruled line.

Syntax
public void addHLine(int x1, int x2, int lineStyle) throws
Epos2Exception
Parameter
x1
Specifies the start position to draw a horizontal ruled line (in dots).

Value Description

Integer from 0 to 65535 Start position to draw a horizontal ruled line (in dots)

x2
Specifies the end position to draw a horizontal ruled line (in dots).

Value Description

Integer from 0 to 65535 End position to draw a horizontal ruled line (in dots)

lineStyle
Specifies the ruled line type.

Value Description

Printer.LINE_THIN Solid line: Fine

Printer.LINE_MEDIUM Solid line: Middle

Printer.LINE_THICK Solid line: Thick

Printer.LINE_THIN_DOUBLE Double line: Fine

Printer.LINE_MEDIUM_DOUBLE Double line: Middle

Printer.LINE_THICK_DOUBLE Double line: Thick

Printer.PARAM_DEFAULT Specifies the default (Solid line: Fine).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

99
Chapter 3 API Reference - Printer class

Supplementary explanation
❏ This API cannot be used in the page mode.
❏ Use addPageLine to draw a horizontal ruled line in the page mode.

100
Chapter 3 API Reference - Printer class

addVLineBegin
Adds a command to start drawing a vertical ruled line to the command buffer.
Starts drawing a vertical line.

Syntax
public void addVLineBegin(int x, int lineStyle, int[] lineId)
throws Epos2Exception
Parameter
x
Specifies the start position to draw a vertical ruled line (in dots).

Value Description

Integer from 0 to 65535 Start position to draw a vertical ruled line (in dots)

lineStyle
Specifies the ruled line type.

Value Description

Printer.LINE_THIN Solid line: Fine

Printer.LINE_MEDIUM Solid line: Middle

Printer.LINE_THICK Solid line: Thick

Printer.LINE_THIN_DOUBLE Double line: Fine

Printer.LINE_MEDIUM_DOUBLE Double line: Middle

Printer.LINE_THICK_DOUBLE Double line: Thick

Printer.PARAM_DEFAULT Specifies the default (Solid line: Fine).

lineId
Returns the ID of the ruled line printed by this API.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used in the page mode.

101
Chapter 3 API Reference - Printer class

❏ Use addPageLine to draw a vertical ruled line in the page mode.


❏ Drawing of the vertical ruled line continues until stopped by the addVLineEnd API.
❏ Use this API with the addVLineEnd API.

102
Chapter 3 API Reference - Printer class

addVLineEnd
Adds a command to stop drawing a vertical ruled line to the command buffer.
Ends drawing a vertical line.

Syntax
public void addVLineEnd(int lineId) throws Epos2Exception
Parameter
lineId
Specifies the line ID acquired by addVLineBegin.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used in the page mode.
❏ Use addPageLine to draw a vertical ruled line in the page mode.
❏ This API draws a vertical ruled line until stopped by addVLineEnd.
❏ Use this API with the addVLineBegin API.

103
Chapter 3 API Reference - Printer class

addPageBegin
Adds a page mode start command to the command buffer.
Starts processing in the page mode.

Syntax
public void addPageBegin() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ The page mode does not support multi-gradation printing.
❏ Use this API with the addPageEnd API.
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.

104
Chapter 3 API Reference - Printer class

addPageEnd
Adds a page mode end command to the command buffer.
Ends processing in the page mode.

Syntax
public void addPageEnd() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ The page mode does not support multi-gradation printing.
❏ Use this API with the addPageBegin API.

105
Chapter 3 API Reference - Printer class

addPageArea
Adds page mode print area setting to the command buffer.
Specifies the page mode print area (coordinates). Following this API, call an API to specify print data such as the
addText API.

Syntax
public void addPageArea(int x, int y, int width, int height)
throws Epos2Exception
Parameter
x
Specifies the horizontal origin (in dots).

Value Description

Integer from 0 to 65535 Horizontal origin (in dots)

"0" specifies the leftmost position of the printable area of the printer.

y
Specifies the vertical origin (in dots).

Value Description

Integer from 0 to 65535 Vertical origin (in dots)

"0" specifies the position where paper is not fed.

width
Specifies the width of a print area (in dots).

Value Description

Integer from 1 to 65535 Width of a print area (in dots)

height
Specifies the height of a print area (in dots).

Value Description

Integer from 1 to 65535 Height of a print area (in dots)

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

106
Chapter 3 API Reference - Printer class

Error status Description

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Define the print area in accordance with the contents to print. If the print data does not fit within the
print area, the printed contents will be truncated.
❏ Use this API between the addPageBegin and addPageEnd APIs.
❏ Specify the width and height of the print area in accordance with the print direction setting.
Otherwise the print data may be truncated. Set the print direction by addPageDirection.
❏ This API does not work in the standard mode.

107
Chapter 3 API Reference - Printer class

addPageDirection
Adds page mode print direction setting to the command buffer.
Specifies the print direction in the page mode.

Syntax
public void addPageDirection(int direction) throws
Epos2Exception
Parameter
direction
Specifies the print direction in the page mode.

Value Description

Do not rotate data. (Data is printed rightward from


Printer.DIRECTION_LEFT_TO_RIGHT (default)
the upper-left position.)

Rotate data counterclockwise by 90 degrees. (Data is


Printer.DIRECTION_BOTTOM_TO_TOP
printed upward from the lower-left position.)

Rotate data by 180 degrees. (Data is printed leftward


Printer.DIRECTION_RIGHT_TO_LEFT
from the lower-right position.)

Rotate data clockwise by 90 degrees. (Data is printed


Printer.DIRECTION_TOP_TO_BOTTOM
downward from the upper-right position.)

Printer.PARAM_DEFAULT Specifies the default value (no rotation).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the standard mode.
❏ Use this API between the addPageBegin and addPageEnd APIs.

108
Chapter 3 API Reference - Printer class

addPagePosition
Adds print position setting within the print area in the page mode to the command buffer.
Specifies the print start position (coordinates) within the area specified by the addPageArea API.

Syntax
public void addPagePosition(int x, int y) throws
Epos2Exception
Parameter
x
Specifies the horizontal print position (in dots).

Value Description

Integer from 0 to 65535 Horizontal print position (in dots)

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

y
Specifies the vertical print position (in dots).

Value Description

Integer from 0 to 65535 Specify the horizontal print position in dots.

Printer.PARAM_UNSPECIFIED <Obsolete> Not specify.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the standard mode.
❏ Use this API between the addPageBegin and addPageEnd APIs.
❏ Specify the print start position (coordinates) in accordance with the contents to print. See below.

109
Chapter 3 API Reference - Printer class

Print data Specification method

Specify the leftmost position of the baseline for the


first character.
When printing a text string This can be omitted when printing data with the
standard size in left justification. When printing a
double-height character, set y to 42 or larger.

Specify the lower-left position of the symbol. Specify


When printing a barcode
the height of the barcode in y.

Specify the lower-left position of the graphic data.


When printing graphics/logo
Specify the height of the graphic data in y.

Specify the upper-left position of the symbol. This


When printing a 2D symbol can be omitted when printing from the upper-left
position.

❏ If all the parameters are set to "Printer.PARAM_UNSPECIFIED," ERR_PARAM will be returned.

110
Chapter 3 API Reference - Printer class

addPageLine
Adds a page mode line draw command to the command buffer.
Draws a line in the page mode.

Syntax
public void addPageLine(int x1, int y1, int x2, int y2, int
lineStyle) throws Epos2Exception
Parameter
x1
Specifies the horizontal position to start drawing (in dots).

Value Description

Integer from 0 to 65535 Horizontal position to start drawing (in dots)

y1
Specifies the vertical position to start drawing (in dots).

Value Description

Integer from 0 to 65535 Vertical position to start drawing (in dots)

x2
Specifies the horizontal position to end drawing (in dots).

Value Description

Integer from 0 to 65535 Horizontal position to end drawing (in dots)

y2
Specifies the vertical position to end drawing (in dots).

Value Description

Integer from 0 to 65535 Vertical position to end drawing (in dots)

lineStyle
Specifies the ruled line type.

Value Description

Printer.LINE_THIN Solid line: Fine

Printer.LINE_MEDIUM Solid line: Middle

Printer.LINE_THICK Solid line: Thick

Printer.LINE_THIN_DOUBLE Double line: Fine

Printer.LINE_MEDIUM_DOUBLE Double line: Middle

111
Chapter 3 API Reference - Printer class

Value Description

Printer.LINE_THICK_DOUBLE Double line: Thick

Printer.PARAM_DEFAULT Specifies the default (Solid line: Fine).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the standard mode.
❏ A diagonal line cannot be drawn.
❏ Use this API between the addPageBegin and addPageEnd APIs.

112
Chapter 3 API Reference - Printer class

addPageRectangle
Adds a page mode rectangle draw command to the command buffer.
Draws a rectangle in the page mode.

Syntax
public void addPageRectangle(int x1, int y1, int x2, int y2, int
lineStyle) throws Epos2Exception
Parameter
x1
Specifies the horizontal position to start drawing (in dots).

Value Description

Integer from 0 to 65535 Horizontal position to start drawing (in dots)

y1
Specifies the vertical position to start drawing (in dots).

Value Description

Integer from 0 to 65535 Vertical position to start drawing (in dots)

x2
Specifies the horizontal position to end drawing (in dots).

Value Description

Integer from 0 to 65535 Horizontal position to end drawing (in dots)

y2
Specifies the vertical position to end drawing (in dots).

Value Description

Integer from 0 to 65535 Vertical position to end drawing (in dots)

lineStyle
Specifies the line type.

Value Description

Printer.LINE_THIN Solid line: Fine

Printer.LINE_MEDIUM Solid line: Middle

Printer.LINE_THICK Solid line: Thick

Printer.LINE_THIN_DOUBLE Double line: Fine

Printer.LINE_MEDIUM_DOUBLE Double line: Middle

113
Chapter 3 API Reference - Printer class

Value Description

Printer.LINE_THICK_DOUBLE Double line: Thick

Printer.PARAM_DEFAULT Specifies the default (Solid line: Fine).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the standard mode.
❏ Use this API between the addPageBegin and addPageEnd APIs.

114
Chapter 3 API Reference - Printer class

addRotateBegin
Adds the start batch rotate print mode to the command buffer.

Syntax
public void addRotateBegin()throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the page mode.
❏ Use the add APIs for batch rotate printing (Example: addText) by enclosing between this API and the
addRotateEnd API.
❏ Do not use the following APIs between this API and the addRotateEnd API.
• endTransaction
• addPageBegin
• addPageEnd
• addCut
• addPulse
• addSound
• setPrinterSetting
• ejectPaper
❏ The data volume that the printer can process in a single batch rotate printing is as described below.
• Strings: 80 lines
• Graphics: 2400 dots
❏ When you are using the add APIs (Example: addText) in the batch rotate print mode, you must take care
while using certain APIs.

API Precautions

• If the longitudinal direction is set to triple angle or higher with addTextSize before
this API, then this API and the succeeding APIs will become double-angled.
addTextSize • If the longitudinal direction is set to triple angle or higher with addTextSize after
this API, then the specification in the longitudinal direction will be ignored and
become single-angled.

The number of paper feed lines varies depending on the line spacing specified in
addFeedUnit addLineSpace. If the line spacing is specified as 30 in addLineSpace, paper feeding
can be performed for 8 lines with the maximum value of addFeedUnit as 255.

115
Chapter 3 API Reference - Printer class

API Precautions

• If the total vertical size of print data exceeds 2400 dots, printing may not be
performed as intended. For example, if 500-dot data B is sent to a location in the
printer buffer where 2000-dot data A is accumulated, then data B will be
accumulated in the printer buffer after data A has been printed.
• The multi-gradation (16 scales) maximum size is up to 600 dots vertically.
addImage In the case of multi-gradation (16 scales), a data volume that is four times that of
monochrome (2 scales) is required.
• If the vertical size of one image element exceeds the data volume that can be
processed in one go, printing will not be performed.
Monochrome (2 scales) maximum value: 2400 dots
Multi-gradation (16 scales) maximum value: 600 dots

116
Chapter 3 API Reference - Printer class

addRotateEnd
Adds the end batch rotate print mode to the command buffer.

Syntax
public void addRotateEnd()throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the page mode.
❏ Use the add APIs for batch rotate printing (Example: addText) by enclosing between this API and the
addRotateBegin API.

117
Chapter 3 API Reference - Printer class

addCut
Adds a sheet cut command to the command buffer.
Sets how to cut paper.

Syntax
public void addCut(int type) throws Epos2Exception
Parameter
type
Specifies how to cut paper.

Value Description

Printer.CUT_FEED Feed cut (cut the sheet after feeding paper).

Cut without feed (cut the sheet without feeding


Printer.CUT_NO_FEED
paper).

Cut reservation (print the following texts and cut the


Printer.CUT_RESERVE
sheet at the cutting position).

Specifies the default (feed cut (cut the sheet after


Printer.PARAM_DEFAULT
feeding paper)).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used in the page mode.
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ If print data is not specified after the cut reservation (Printer.CUT_RESERVE), the printer will execute the
cut after feeding paper up to the position of the reserved cut.
❏ Depending on the printer, it may wait approximately 2 seconds for the print data after the cut reserva-
tion (Printer.CUT_RESERVE) before starting the paper feed operation.
❏ When using the cut reservation (Printer.CUT_RESERVE), set the length of one receipt to at least 20 mm.

118
Chapter 3 API Reference - Printer class

addPulse
Adds a drawer kick command to the command buffer.
Sets the drawer kick.

Syntax
public void addPulse(int drawer, int time) throws
Epos2Exception
Parameter
drawer
Specifies the drawer kick connector.

Value Description

Printer.DRAWER_2PIN Drawer kick connector pin No.2

Printer.DRAWER_5PIN Drawer kick connector pin No.5

Specifies the default (drawer kick connector pin


Printer.PARAM_DEFAULT
No.2).

time
Specifies the on time of the drawer kick signal.

Value Description

Printer.PULSE_100 100-msec signal

Printer.PULSE_200 200-msec signal

Printer.PULSE_300 300-msec signal

Printer.PULSE_400 400-msec signal

Printer.PULSE_500 500-msec signal

Printer.PARAM_DEFAULT Specifies the default (100-msec signal).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used in the page mode.

119
Chapter 3 API Reference - Printer class

❏ The drawer and optional external buzzer cannot be connected simultaneously.


❏ Do not open the drawer repeatedly for a short time. The drawer may be damaged due to too much load.
❏ For built-in buzzer equipped models of the following printers, sounding the buzzer is possible using the
pulse output commands for drawer kick connectors.
For details on controlling the built-in buzzer, refer to the Technical Reference Guide of the printer.
• TM-T70
• TM-T70II
• TM-T82II
• TM-T82III
• TM-T83II
• TM-T88IV
• TM-T88V
• TM-T88VI
• TM-T88VII
• TM-T82II-i
• TM-T83II-i
• TM-T88VI-iHUB
• TM-L90

120
Chapter 3 API Reference - Printer class

addSound
Adds buzzer sound setting to the command buffer.
Sets the buzzer.

Syntax
public void addSound(int pattern, int repeat, int cycle) throws
Epos2Exception
Parameter
pattern
Specifies the buzzer tone.

Value Description

Printer.PATTERN_NONE Stop (Mobile models)

Stop. However, the buzzer already sounding does not


Printer.PATTERN_NONE
stop. (Except for Mobile models)

Printer.PATTERN_A Pattern A (optional external buzzer)

Printer.PATTERN_B Pattern B (optional external buzzer)

Printer.PATTERN_C Pattern C (optional external buzzer)

Printer.PATTERN_D Pattern D (optional external buzzer)

Printer.PATTERN_E Pattern E (optional external buzzer)

Printer.PATTERN_ERROR Error sound pattern (optional external buzzer)

Printer.PATTERN_PAPER_EMPTY Paper empty sound pattern (optional external buzzer)

Printer.PATTERN_1 Pattern 1 (built-in buzzer)

Printer.PATTERN_2 Pattern 2 (built-in buzzer)

Printer.PATTERN_3 Pattern 3 (built-in buzzer)

Printer.PATTERN_4 Pattern 4 (built-in buzzer)

Printer.PATTERN_5 Pattern 5 (built-in buzzer)

Printer.PATTERN_6 Pattern 6 (built-in buzzer)

Printer.PATTERN_7 Pattern 7 (built-in buzzer)

Printer.PATTERN_8 Pattern 8 (built-in buzzer)

Printer.PATTERN_9 Pattern 9 (built-in buzzer)

Printer.PATTERN_10 Pattern 10 (built-in buzzer)

Printer.PARAM_DEFAULT Specifies the default (Pattern A).

121
Chapter 3 API Reference - Printer class

repeat
Specifies the repeat count.

Value Description

0 Unlimited

1 to 255 1 to 255 times

Printer.PARAM_DEFAULT Specifies the default (once).

cycle
Specifies the buzzer sound interval (in milliseconds).

Value Description

1000 to 25500 1000 to 25500 milliseconds

Printer.PARAM_DEFAULT Specifies the default (1000 milliseconds).

Effective for Patterns 1 to 10 only.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used in the page mode.
❏ The drawer and optional external buzzer cannot be connected simultaneously.
❏ This API cannot be used if the printer is not equipped with a buzzer.
❏ The timing to receive the callback of sendData API varies by printer.
Mobile models: after the sendData API is executed.
Other than Mobile models: after the buzzer sounding is finished.
❏ For built-in buzzer equipped models of the following printers, sounding the buzzer is possible using
addPulse.
• TM-T70
• TM-T70II
• TM-T82II
• TM-T82III
• TM-T83II
• TM-T88IV
• TM-T88V
• TM-T88VI

122
Chapter 3 API Reference - Printer class

• TM-T88VII
• TM-T82II-i
• TM-T83II-i
• TM-T88VI-iHUB
• TM-L90

123
Chapter 3 API Reference - Printer class

addFeedPosition
Adds a label sheet/black mark sheet feed command to the command buffer.

Syntax
public void addFeedPosition(int position) throws
Epos2Exception
Parameter
position
Specifies the paper feed position.

Value Description

Printer.FEED_PEELING Feed the sheet to the peeling position.

Printer.FEED_CUTTING Feed the sheet to the cut position.

Printer.FEED_CURRENT_TOF Feed the sheet to the top of the current label.

Printer.FEED_NEXT_TOF Feed the sheet to the top of the next label.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ The label sheet/black mark sheet can be controlled in the standard mode.
❏ This API cannot be used in the page mode.
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.

124
Chapter 3 API Reference - Printer class

addLayout
Adds layout setting of the label sheet/black mark sheet to the command buffer.

Syntax
public void addLayout(int type, int width, int height, int
marginTop, int marginBottom, int offsetCut, int offsetLabel)
throws Epos2Exception
Parameter
type
Specifies the paper type.

Value Description

Printer.LAYOUT_RECEIPT Receipt (without black mark)

Printer.LAYOUT_RECEIPT_BM Receipt (with black mark)

Printer.LAYOUT_LABEL Label sheet (without black mark)

Printer.LAYOUT_LABEL_BM Label sheet (with black mark)

width
Specifies the paper width (in 0.1 mm units).

Value
Description
TM Printer Models POS Terminal Model

Integer from 1 to 10000 Integer from 290 to 600 Paper width (in 0.1 mm units)

height
Specifies the distance from the print reference mark to the next print reference mark (in 0.1mm units).

Value
Sheet type Description
TM Printer POS Terminal
Models Model

Receipt (without black mark) 0 0 No distance specified (auto)

Distance between the top edges of two


Receipt (with black mark)
consecutive black marks.

Distance between the top edges of two


Label sheet (without black mark) 0 to 10000 0 to 1550
consecutive labels

Distance between the bottom edges of


Label sheet (with black mark)
two consecutive black marks.

125
Chapter 3 API Reference - Printer class

marginTop
Specifies the distance from the print reference mark to the top of the sheet (in 0.1mm units).

Value
Sheet type Description
TM Printer POS Terminal
Models Model

Receipt (without black mark) 0 0 No distance specified (auto)

Distance from the top edge of the black


Receipt (with black mark) -9999 to 10000 -150 to 1500
mark to the top of the sheet

Distance from the top edge of the label


Label sheet (without black mark) 0 to 10000 0 to 1500
to the top of the sheet

Distance from the bottom edge of the


Label sheet (with black mark) -9999 to 10000 -15 to 1500
black mark to the top of the sheet

marginBottom
Specifies the distance from the eject reference mark to the bottom edge of the printable area (in 0.1mm
units).

Value
Sheet type Description
TM Printer POS Terminal
Models Model

Receipt (without black mark) 0 0 No distance specified (auto)

Receipt (with black mark) 0 0 No distance specified (auto)

Distance from the bottom edge of the


Label sheet (without black mark) -9999 to 0 -15 to 0 label (A positive value represents the
paper feed direction.)

Distance from the top of the black mark


Label sheet (with black mark) -9999 to 10000 -15 to 15 (A positive value represents the paper
feed direction.)

offsetCut
Specifies the distance from the eject reference mark to the cut position (in 0.1mm units).

Value
Sheet type TM Printer POS Terminal Description
Models Model

Receipt (without black mark) 0 0 No distance specified (auto)

Distance from the top edge of the black


Receipt (with black mark) -9999 to 10000 -290 to 50
mark to the cut position

Distance from the bottom edge of the


Label sheet (without black mark) 0 to 10000 0 to 50
label to the cut position

Distance from the top edge of the black


Label sheet (with black mark) 0 to 10000 0 to 50
mark to the cut position

126
Chapter 3 API Reference - Printer class

offsetLabel
Specifies the distance from the eject reference mark to the bottom edge of the label (in 0.1mm units).

Value
Sheet type Description
TM Printer POS Terminal
Models Model

Receipt (without black mark) 0 0 No distance specified (auto)

Receipt (with black mark) 0 0 No distance specified (auto)

Label sheet (without black mark) 0 0 No distance specified (auto)

Distance from the top edge of the black


Label sheet (with black mark) 0 to 10000 0 to 15
mark to the bottom edge of a label

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API does not work in the page mode.
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ Available setting values vary by TM printer model. For more details, see the FS (L<Function 33> com-
mand.
https://reference.epson-biz.com/pos/reference/
❏ The available parameter values for each type of paper are listed below.
The following table shows available values for TM printer models, and shows those for POS terminal
models in parentheses.

127
Chapter 3 API Reference - Printer class

Receipt Label sheet Label sheet Receipt Symbol


Parameter (without (without (with black (with black in dia-
black mark) black mark) mark) mark) gram

width 1 to 10000 (290 to 600) f

height 0 (0) 0 to 10000 (0 to 1550) a

0 to 10000 -9999 to 10000 -9999 to 10000


marginTop 0 (0) b
(0 to 1500) (-15 to 1500) (-150 to 1500)

-9999 to 0 -9999 to 10000


marginBottom 0 (0) 0 (0) e
(-15 to 0) (-15 to 15)

-9999 to 10000
offsetCut 0 (0) 0 to 10000 (0 to 50) c
(-290 to 50)

0 to 10000
offsetLabel 0 (0) d
(0 to 15)

Receipt <with Black Mark>


f f
b c
Top position

Cut

Label
f f

b Cut b

Top position
Top position

a a
Bottom edge
Bottom edge e of print area e
d
of print area
Standard eject
Cut

c Bottom edge c
of label

128
Chapter 3 API Reference - Printer class

addCommand
Adds a command to the command buffer.
Sends the ESC/POS command.

Syntax
public void addCommand(byte[] data) throws Epos2Exception
Parameter
data
Specifies the ESC/POS command.
Specifies the binary data.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Refer to the following URL for details of the ESC/POS command.
https://reference.epson-biz.com/modules/ref_escpos/
❏ Epson ePOS SDK does not check the commands sent using this API.
If the commands interfere with Epson ePOS SDK operations, other APIs may work wrongly or status val-
ues may become invalid.
This API should be used with a full understanding of ESC/POS commands and the receipt printer specifi-
cations.

129
Chapter 3 API Reference - Printer class

getMaintenanceCounter
Acquires the value of the printer's maintenance counter.
The value acquired by this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void getMaintenanceCounter(int timeout, int type,
MaintenanceCounterListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

type
Specifies the type of maintenance counter to be acquired.

Value Description

Printer.MaintenanceCounter.PaperFeed Number of paper feed lines

Printer.MaintenanceCounter.AutoCutter Number of times auto cutter is operated

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onGetMaintenanceCounter(int code, int type, int
value);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_PARAM An invalid parameter was passed.

130
Chapter 3 API Reference - Printer class

Error status Description

Memory necessary for processing could not be allo-


CODE_ERR_MEMORY
cated.

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

CODE_ERR_FAILURE An unknown error occurred.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.

131
Chapter 3 API Reference - Printer class

resetMaintenanceCounter
Resets the value of the printer's maintenance counter.
The value acquired by this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void resetMaintenanceCounter(int timeout, int type,
MaintenanceCounterListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

type
Specifies the type of maintenance counter to be reset.

Value Description

Printer.MaintenanceCounter.PaperFeed Number of paper feed lines

Printer.MaintenanceCounter.AutoCutter Number of times auto cutter is operated

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onResetMaintenanceCounter(int code, int type);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


CODE_ERR_MEMORY
cated.

132
Chapter 3 API Reference - Printer class

Error status Description

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

CODE_ERR_FAILURE An unknown error occurred.

❏ type
The type of maintenance counter reset is stored.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ Do not execute this API more than 10 times per day. If executed more than this number of times, the
printer may become unable to operate.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.

133
Chapter 3 API Reference - Printer class

getPrinterSetting
Acquires the set value of the printer setting.
The value acquired by this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void getPrinterSetting(int timeout, int type,
PrinterSettingListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

type
Specifies the printer setting item to be acquired.

Value Description

Printer.Setting.PaperWidth Paper width

Printer.Setting.PrintDensity Print density

Printer.Setting.PrintSpeed Print speed

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onGetPrinterSetting(int code, int type, int value);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_PARAM An invalid parameter was passed.

134
Chapter 3 API Reference - Printer class

Error status Description

Memory necessary for processing could not be allo-


CODE_ERR_MEMORY
cated.

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

CODE_ERR_FAILURE An unknown error occurred.

❏ type
The acquired printer setting item is stored.

Value Description

Printer.Setting.PaperWidth Paper width

Printer.Setting.PrintDensity Print density

Printer.Setting.PrintSpeed Print speed

❏ value
The acquired set value of the printer setting is stored.

Value Description

Printer.Setting.PaperWidth58_0 Paper width 58 mm

Printer.Setting.PaperWidth60_0 Paper width 60 mm

Printer.Setting.PaperWidth80_0 Paper width 80 mm

Printer.Setting.PrintDensityDIP Print density DIP switch setting

Printer.Setting.PrintDensity70 Print density 70%

Printer.Setting.PrintDensity75 Print density 75%

Printer.Setting.PrintDensity80 Print density 80%

Printer.Setting.PrintDensity85 Print density 85%

Printer.Setting.PrintDensity90 Print density 90%

Printer.Setting.PrintDensity95 Print density 95%

Printer.Setting.PrintDensity100 Print density 100%

Printer.Setting.PrintDensity105 Print density 105%

Printer.Setting.PrintDensity110 Print density 110%

Printer.Setting.PrintDensity115 Print density 115%

Printer.Setting.PrintDensity120 Print density 120%

Printer.Setting.PrintDensity125 Print density 125%

135
Chapter 3 API Reference - Printer class

Value Description

Printer.Setting.PrintDensity130 Print density 130%

Printer.Setting.PrintSpeed1 Print speed level 1

Printer.Setting.PrintSpeed2 Print speed level 2

Printer.Setting.PrintSpeed3 Print speed level 3

Printer.Setting.PrintSpeed4 Print speed level 4

Printer.Setting.PrintSpeed5 Print speed level 5

Printer.Setting.PrintSpeed6 Print speed level 6

Printer.Setting.PrintSpeed7 Print speed level 7

Printer.Setting.PrintSpeed8 Print speed level 8

Printer.Setting.PrintSpeed9 Print speed level 9

Printer.Setting.PrintSpeed10 Print speed level 10

Printer.Setting.PrintSpeed11 Print speed level 11

Printer.Setting.PrintSpeed12 Print speed level 12

Printer.Setting.PrintSpeed13 Print speed level 13

Printer.Setting.PrintSpeed14 Print speed level 14

Printer.Setting.PrintSpeed15 Print speed level 15

Printer.Setting.PrintSpeed16 Print speed level 16

Printer.Setting.PrintSpeed17 Print speed level 17

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.

136
Chapter 3 API Reference - Printer class

setPrinterSetting
Changes the set value of the printer setting.
The value acquired by this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void setPrinterSetting(int timeout,
java.util.Map<java.lang.Integer, j ava.lang.Integer> list,
PrinterSettingListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

list
Specifies the list combining the changed printer setting item (type) and the set value (value).

type
Specifies the printer setting item to be changed.

Value Description

Printer.Setting.PaperWidth Paper width

Printer.Setting.PrintDensity Print density

Printer.Setting.PrintSpeed Print speed

value
Specifies the set value of the printer setting to be changed.

Value Description

Printer.Setting.PaperWidth58_0 Paper width 58 mm

Printer.Setting.PaperWidth60_0 Paper width 60 mm

Printer.Setting.PaperWidth80_0 Paper width 80 mm

Printer.Setting.PrintDensityDIP Print density DIP switch setting

Printer.Setting.PrintDensity70 Print density 70%

Printer.Setting.PrintDensity75 Print density 75%

Printer.Setting.PrintDensity80 Print density 80%

Printer.Setting.PrintDensity85 Print density 85%

137
Chapter 3 API Reference - Printer class

Value Description

Printer.Setting.PrintDensity90 Print density 90%

Printer.Setting.PrintDensity95 Print density 95%

Printer.Setting.PrintDensity100 Print density 100%

Printer.Setting.PrintDensity105 Print density 105%

Printer.Setting.PrintDensity110 Print density 110%

Printer.Setting.PrintDensity115 Print density 115%

Printer.Setting.PrintDensity120 Print density 120%

Printer.Setting.PrintDensity125 Print density 125%

Printer.Setting.PrintDensity130 Print density 130%

Printer.Setting.PrintSpeed1 Print speed level 1

Printer.Setting.PrintSpeed2 Print speed level 2

Printer.Setting.PrintSpeed3 Print speed level 3

Printer.Setting.PrintSpeed4 Print speed level 4

Printer.Setting.PrintSpeed5 Print speed level 5

Printer.Setting.PrintSpeed6 Print speed level 6

Printer.Setting.PrintSpeed7 Print speed level 7

Printer.Setting.PrintSpeed8 Print speed level 8

Printer.Setting.PrintSpeed9 Print speed level 9

Printer.Setting.PrintSpeed10 Print speed level 10

Printer.Setting.PrintSpeed11 Print speed level 11

Printer.Setting.PrintSpeed12 Print speed level 12

Printer.Setting.PrintSpeed13 Print speed level 13

Printer.Setting.PrintSpeed14 Print speed level 14

Printer.Setting.PrintSpeed15 Print speed level 15

Printer.Setting.PrintSpeed16 Print speed level 16

Printer.Setting.PrintSpeed17 Print speed level 17

138
Chapter 3 API Reference - Printer class

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onSetPrinterSetting(int code);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


CODE_ERR_MEMORY
cated.

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

CODE_ERR_FAILURE An unknown error occurred.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Use this API at the "beginning of a line." If this API is used elsewhere, it will be ignored.
❏ Do not turn off the power supply to the printer while executing this API.
❏ If communication with the printer is disconnected during execution of this API, the printer may become
unable to operate. In such a case, turn the power supply to the printer off and then on again.
❏ Communication with the printer disconnects as the printer automatically restarts during execution of
this API. Reconnect as necessary.

139
Chapter 3 API Reference - Printer class

In a network environment that uses DHCP, the IP address may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
When connected via USB, the USB device node may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.

140
Chapter 3 API Reference - Printer class

getPrinterSettingEx
Acquires the set value of the printer setting in JSON format.
This API error status is the API processing result.
The processing result of the devices using this API is notified to the listener registration method set by the
setGetPrinterSettingExListener API of the Printer class.

Syntax
public void getPrinterSettingEx(int timeout) throws
Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

Integer from 5000 to 60000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (30000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

This API was called while no communication had


ERR_ILLEGAL
been started.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

ERR_TYPE_INVALID The device type is different.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth and USB.
❏ This API cannot be used with SSL/TLS communication.
❏ If this API is executed in a non-supported printer, CODE_SUCCESS is stored in the setGetPrinterSettingEx-
Listener API code, and "" (blank character) is stored in jsonString.

141
Chapter 3 API Reference - Printer class

setPrinterSettingEx
Changes the set value of the printer setting in JSON format.
For the JSON used in this API, use the printer information JSON acquired with the getPrinterSettingEx API.
Execute the getPrinterSettingEx API after executing this API, and check that the printer settings have been
changed correctly.
This API error status is the API processing result.
The processing result of the devices using this API is notified to the listener registration method set by the
setSetPrinterSettingExListener API of the Printer class.
Do not execute this API in continuation without checking the processing result with the callback method.

Syntax
public void setPrinterSettingEx(int timeout, java.lang.String
jsonString) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

Integer from 5000 to 60000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (30000).

jsonString
Specifies the set value of the printer setting in JSON format.
Refer to JSON_Spec_sheet.pdf included in the package for more information.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

This API was called while no communication had


ERR_ILLEGAL
been started.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

ERR_TYPE_INVALID The device type is different.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.

142
Chapter 3 API Reference - Printer class

❏ Use this API at the "Beginning of the row". Use of this API at positions other than the beginning will result
in it being disabled.
❏ Do not turn off the power supply to the printer while executing this API.
❏ Immediately after starting the printer, do not execute this API until the LED is lit.
Execution takes time, and a timeout error may occur.
❏ If communication with the printer is disconnected during execution of this API, the printer may become
unable to operate. In such a case, turn the power supply to the printer off and then on again.
❏ Communication with the printer disconnects as the printer automatically restarts during execution of
this API. Reconnect as necessary.
In a network environment that uses DHCP, the IP address may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
When connected via USB, the USB device node may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth and USB.
❏ This API cannot be used with SSL/TLS communication.
❏ When this API is used with the system configuration of a TM printer + DM-D + barcode scanner model
Wi-Fi/Ethernet connection and POS terminal model, ERR_FAILURE is returned.
❏ It may take some time to change printer settings depending on the printer used or the connection
method with the printer.
❏ If this API is executed in a non-supported printer, CODE_SUCCESS is stored in the setSetPrinterSettingEx-
Listener API code, but printer settings will not be executed.

143
Chapter 3 API Reference - Printer class

getPrinterInformation
Acquires the printer serial number and the missing dot information of the thermal head.
The value acquired by this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void getPrinterInformation(int timeout,
PrinterInformationListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

Integer from 5000 to 60000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onGetPrinterInformation(int code, String jsonString);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Successful

CODE_ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


CODE_ERR_MEMORY
be allocated.

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

Could not run the process because the printer is


CODE_ERR_DEVICE_BUSY
operating.

CODE_ERR_FAILURE An unknown error occurred.

❏ jsonString
The acquired printer information is stored in the JSON format.

144
Chapter 3 API Reference - Printer class

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

This API was called while no communication had


ERR_ILLEGAL
been started.

jsonString
Example of acquisition execution result

{
"PrinterSpec": {
"Product": {
"SerialNo": "ABC1234567"
}
},
"Maintenance": {
"ThermalHead": {
"NumberOfWarningDot": "0",
"PositionOfWarningDot": "",
"NumberOfBrokenDot": "0",
"PositionOfBrokenDot": ""
}
}
}

SerialNo

Value Description

String Printer serial number

NumberOfWarningDot
The number of dots exceeding the Warning threshold value of the thermal head is stored.

Value Description

-1 Failed to detect missing dots.

0 No dots exceeding the Warning threshold value.

Number of dots exceeding the Warning threshold


Integer from 1 to 512
value.

145
Chapter 3 API Reference - Printer class

PositionOfWarningDot
If there are dots exceeding the Warning threshold value of the thermal head, a 128-byte hexadecimal string
is stored.
In this hexadecimal string, the position of the left-end dots on the print surface is treated as the most signif-
icant bit, and the position of the dots exceeding the Warning threshold value is treated as bit 1.

Value Description

Failed to detect missing dots.


"" (Blank character) Alternatively, there are no dots exceeding the Warn-
ing threshold value.

Most significant bit: Position of the left-end dots on


the print surface
Hexadecimal string
bit 1: Position of the dots exceeding the Warning
threshold value.

NumberOfBrokenDot
The number of dots exceeding the Fault threshold value of the thermal head is stored.

Value Description

-1 Failed to detect missing dots.

0 No dots exceeding the Fault threshold value.

Integer from 1 to 512 Number of dots exceeding the Fault threshold value.

PositionOfBrokenDot
If there are dots exceeding the Fault threshold value of the thermal head, a 128-byte hexadecimal string is
stored.
In this hexadecimal string, the position of the left-end dots on the print surface is treated as the most signif-
icant bit, and the position of the dots exceeding the Fault threshold value is treated as bit 1.

Value Description

Failed to detect missing dots.


"" (Blank character) Alternatively, there are no dots exceeding the Fault
threshold value.

Most significant bit: Position of the left-end dots on


the print surface
Hexadecimal string
bit 1: Position of the dots exceeding the Fault thresh-
old value.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth®and USB.

146
Chapter 3 API Reference - Printer class

❏ This API cannot be used with SSL/TLS communication.


❏ When this API is used with the system configuration of a POS terminal model and TM printer + DM-D +
barcode scanner model (Wi-Fi/Ethernet connection), Epos2Exception including ERR_FAILURE occurs.
❏ If this API is executed in a non-supported printer, "" (Blank character) is stored in jsonString.
❏ It may take some time to acquire printer information depending on the printer used or the connection
method with the printer.

147
Chapter 3 API Reference - Printer class

downloadFirmwareList
Acquires a list of firmware from the server.
The firmware list acquired by this API is notified to the listener registration method specified in the listener
parameter.

Syntax
<alternative>
public void downloadFirmwareList(java.lang.String
printerModel, java.lang.String option
FirmwareUpdateListener listener) throws Epos2Exception
<obsolete>
public void downloadFirmwareList(java.lang.String
printerModel, FirmwareUpdateListener listener) throws
Epos2Exception
Parameter
printerModel
Specifies the model name of the target printer.

Value Description

TM-m10 TM-m10

TM-m30 TM-m30

TM-m30II TM-m30II

TM-m30II-H TM-m30II-H

TM-m30II-NT TM-m30II-NT

TM-m30II-S TM-m30II-S

TM-T88VI TM-T88VI

TM-T88VI-iHUB TM-T88VI-iHUB

option
Specifies the version of the target firmware.

Value Description

-A Ver.*.*A ESC/POS

-B Ver.*.*B ESC/POS

Ver.*.*A ESC/POS:For OT-WL02/WL06 users


Ver.*.*B ESC/POS:For OT-WL05/WL06 users
Check the firmware release information for the detailed functions of each firmware version.
If you don't use a wireless LAN unit, you can choose either A or B.

148
Chapter 3 API Reference - Printer class

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onDownloadFirmwareList(int code, FirmwareInfo[]
firmwareList);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_CONNECT Communication with the server failed.

❏ firmwareList
A list of downloadable firmware is stored in Epos2FirmwareInfo in Array format.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Communication with the server failed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API can be used in an environment where it can connect to both the Internet and a printer.
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.
❏ If no firmware image exists on the server, the firmware list cannot be acquired.

149
Chapter 3 API Reference - Printer class

getPrinterFirmwareInfo
Acquires the firmware information for the connected printer.
The firmware information acquired by this API is notified to the listener registration method specified in the
listener parameter.

Syntax
public void getPrinterFirmwareInfo(int timeout,
FirmwareUpdateListener listener) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before acquisition of firmware information is complete in milliseconds.

Value Description

Integer from 15000 to 60000 Timeout period (in milliseconds)

EPOS2_PARAM_DEFAULT Specifies the default value (30000).

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onReceiveFirmwareInformation(FirmwareInfo
firmwareInfo);

❏ firmwareInfo
The firmware information for the connected printer is stored.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

Processing did not complete within the specified


ERR_TIMEOUT
time period.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

150
Chapter 3 API Reference - Printer class

Supplementary explanation
❏ This API can be used in an environment where it can connect to both the Internet and a printer.
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.
❏ Connect to only Printer class when executing this API.

151
Chapter 3 API Reference - Printer class

verifyUpdate
Compares the firmware of the connected printer with the firmware image specified by updateFirmware.
Execute this API after executing updateFirmware, and confirm that the printer firmware has been overwritten by
the firmware image specified in updateFirmware.
The processing result of this API is notified to the listener registration method specified in the listener parameter.

Syntax
public void verifyUpdate(FirmwareInfo targetFirmwareInfo,
FirmwareUpdateListener listener) throws Epos2Exception
Parameter
targetFirmwareInfo
Specifies the firmware image version that you want to apply to the printer from the list acquired by down-
loadFirmwareList.
Specifies the same firmware image as the one specified by the targetFirmwareInfo parameter of update-
Firmware.

listener
Registers the listener registration method that returns the processing result of this API.
- (void) onUpdateVerify:(int)code;

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

The compatible model of the firmware image speci-


CODE_ERR_DIFFERENT_MODEL fied in targetFirmwareInfo differs from the model
name of the connected printer.

The version of the firmware image specified in tar-


CODE_ERR_DIFFERENT_VERSION getFirmwareInfo differs from the firmware version of
the connected printer.

CODE_ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


CODE_ERR_MEMORY
cated.

Processing did not complete within the specified


CODE_ERR_TIMEOUT
time period.

CODE_ERR_DATA_CORRUPTED The firmware image is corrupt.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

152
Chapter 3 API Reference - Printer class

Error status Description

CODE_ERR_FAILURE An unknown error occurred.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

An invalid parameter was passed.


ERR_PARAM This API was called before updateFirmware was exe-
cuted.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API can be used in an environment where it can connect to both the Internet and a printer.
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.
❏ Connect to only Printer class when executing this API.

153
Chapter 3 API Reference - Printer class

updateFirmware
Downloads the firmware image from the server and instructs the printer to overwrite the firmware image.
Execute verifyUpdate after executing this API, and confirm that the printer firmware has been overwritten by the
firmware image.
The return value from this API is the result of instructing writing of the firmware image to the printer. It is not the
execution result of the overall firmware update.
The progress and processing result of this API is notified to the listener registration method specified in the
listener parameter.

Syntax
public void updateFirmware(FirmwareInfo
targetFirmwareInfo, FirmwareUpdateListener listener,
android.content.Context context) throws Epos2Exception
Parameter
targetFirmwareInfo
Specifies the firmware image version that you want to apply to the printer from the list acquired by down-
loadFirmwareList.

listener
Registers the listener registration method that returns the progress and execution result of this API.
• Acquires the progress status
- (void) onFirmwareUpdateProgress(String task, float
progress);

❏ task
The name of the executed process is stored.

Name Description

Prepare Under preparation

Download Firmware Downloading the firmware image from the server

Sending the downloaded firmware image to the


Sending firmware image
printer

❏ progress
A value between 0.0 and 1.0 is stored according to the progress status of the executed process.

154
Chapter 3 API Reference - Printer class

• Acquires the execution result


- (void) onUpdateFirmware(int code, int maxWaitTime);

❏ code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

The compatible model of the firmware image speci-


CODE_ERR_DIFFERENT_MODEL fied in targetFirmwareInfo differs from the model
name of the connected printer.

CODE_ERR_PARAM An invalid parameter was passed.

CODE_ERR_MEMORY Necessary memory could not be allocated.

CODE_ERR_CONNECT No communication with the printer or server.

Processing did not complete within the specified


CODE_ERR_TIMEOUT
time period.

Could not access the firmware image downloaded


CODE_ERR_IO
from the server.

CODE_ERR_DATA_CORRUPTED The firmware image is corrupt.

CODE_ERR_PROCESSING Could not run the process.

This API was called while no communication had


CODE_ERR_ILLEGAL
been started.

CODE_ERR_FAILURE An unknown error occurred.

❏ maxWaitTime
The maximum wait time to complete writing of the firmware image is stored.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API can be used in an environment where it can connect to both the Internet and a printer.
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Do not turn off the power supply to the printer while executing this API.
❏ Immediately after starting the printer, do not execute this API until the LED is lit.
Execution takes time, and a timeout error may occur.

155
Chapter 3 API Reference - Printer class

❏ Communication with the printer disconnects as the printer automatically restarts during execution of
this API. Reconnect as necessary.
In a network environment that uses DHCP, the IP address may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
When connected via USB, the USB device node may change due to restart of the printer.
In such a case, search for the printer using Discovery class and reconnect.
❏ This API can be used in the system configuration of the TM printer model and customer display model.
With the system configuration of the TM Printer + DM-D + barcode scanner model, this API can be used
when connecting via Bluetooth or USB.
❏ This API cannot be used with SSL/TLS communication.
❏ Connect to only Printer class when executing this API.
❏ When updating the firmware by executing this API, note the following points:
• The time required to update depends on the interface.
• About 15 minutes for a network connection
• About 85 minutes for a Bluetooth connection
• You cannot stop the update once it has started.
• Check that the smart device is charged sufficiently.
• Check that no errors have occurred in the printer.
• Check that the printer's communication status is in good condition.
• Do not operate the smart device while updating the firmware.
• Do not disconnect the connection cable and power cable while updating the firmware.
• Do not sleep the smart device while updating the firmware.

156
Chapter 3 API Reference - Printer class

forceRecover
Forcibly sends the error recovery command from a recoverable error status (example: auto cutter error).
For details on recoverable errors, refer to the Technical Reference Guide of each printer.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.

Syntax
public void forceRecover(int timeout) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ After recovering from a recoverable error, the buffer of the printer is reset.
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

157
Chapter 3 API Reference - Printer class

forcePulse
Forcibly sends the drawer kick command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.

Syntax
public void forcePulse(int drawer, int pulseTime, int timeout)
throws Epos2Exception
Parameter
drawer
Specifies the drawer kick connector.

Value Description

Printer.DRAWER_2PIN Drawer kick connector pin No.2

Printer.DRAWER_5PIN Drawer kick connector pin No.5

Specifies the default (drawer kick connector pin


Printer.PARAM_DEFAULT
No.2).

time
Specifies the on time of the drawer kick signal.

Value Description

Printer.PULSE_100 100-msec signal

Printer.PULSE_200 200-msec signal

Printer.PULSE_300 300-msec signal

Printer.PULSE_400 400-msec signal

Printer.PULSE_500 500-msec signal

Printer.PARAM_DEFAULT Specifies the default (100-msec signal).

timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

158
Chapter 3 API Reference - Printer class

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ The drawer and optional external buzzer cannot be connected simultaneously.
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

159
Chapter 3 API Reference - Printer class

forceStopSound
Forcibly sends the buzzer sound command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.

Syntax
public void forceStopSound(int timeout) throws
Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ The drawer and optional external buzzer cannot be connected simultaneously.
❏ This API cannot be used if the printer is not equipped with a buzzer.
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

160
Chapter 3 API Reference - Printer class

forceCommand
Forcibly sends the ESC/POS command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.

Syntax
public void (byte[] data, int timeout) throws Epos2Exception
Parameter
data
Forcibly sends the ESC/POS command.
Specifies the binary data.

timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

161
Chapter 3 API Reference - Printer class

forceReset
Forcibly sends the printer reset command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the Printer class.

Syntax
- public void forceReset(int timeout) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

Printer.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

162
Chapter 3 API Reference - Printer class

setStatusChangeEventListener
Registers a listener registration method for a status change event.

Syntax
public void setStatusChangeEventListener
(StatusChangeListener statusChangeListener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface StatusChangeListener extends EventListener
Listener registration method
void onPtrStatusChange(Printer printerObj, int eventType)
Parameter
printerObj
The callback source object is stored.

eventType
The type of the event that occurred is stored.

Event type Description

Printer.EVENT_ONLINE Online

Printer.EVENT_OFFLINE Offline

Printer.EVENT_POWER_OFF Power off

Printer.EVENT_COVER_CLOSE Cover close

Printer.EVENT_COVER_OPEN Cover open

Printer.EVENT_PAPER_OK Paper remains.

Printer.EVENT_PAPER_NEAR_END Paper has almost run out.

Printer.EVENT_PAPER_EMPTY Paper has run out.

Printer.EVENT_DRAWER_HIGH Drawer kick connector pin No.3 status = "H"

Printer.EVENT_DRAWER_LOW Drawer kick connector pin No.3 status = "L"

Printer.EVENT_BATTERY_ENOUGH Battery is enough.

Printer.EVENT_BATTERY_EMPTY Battery has run out.

Printer.EVENT_REMOVAL_WAIT_PAPER Waiting for label removal.

Printer.EVENT_REMOVAL_WAIT_NONE Not waiting for label removal.

163
Chapter 3 API Reference - Printer class

Event type Description

Printer.EVENT_AUTO_RECOVER_ERROR Automatic recovery error status

Printer.EVENT_AUTO_RECOVER_OK Not automatic recovery error status.

Printer.EVENT_UNRECOVERABLE_ERROR Unrecoverable error occurred.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

164
Chapter 3 API Reference - Printer class

setReceiveEventListener
Registers a listener registration method for a print completion event.

Syntax
public void setReceiveEventListener (ReceiveListener
receiveListener)
Parameter
target
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onPtrReceive (Printer printerObj, int code,
PrinterStatusInfo status, String printJobId)
Parameter
printerObj
The callback source object is stored.

code
The processing result is stored.

Error status Description

CODE_SUCCESS Print succeeded.

CODE_PRINTING Printing

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

CODE_ERR_FAILURE Error exists in the requested document syntax.

CODE_ERR_NOT_FOUND Printer specified by the device ID does not exist.

CODE_ERR_SYSTEM Error occurred with the printing system.

CODE_ERR_PORT Error was detected with the communication port.

CODE_ERR_TIMEOUT Print timeout occurred.

165
Chapter 3 API Reference - Printer class

Error status Description

CODE_ERR_JOB_NOT_FOUND Specified print job ID does not exist.

CODE_ERR_SPOOLER Print queue is full.

CODE_ERR_BATTERY_LOW Battery has run out.

The number of print jobs sent to the printer has


CODE_ERR_TOO_MANY_REQUESTS
exceeded the allowable limit.

The size of the print job data exceeds the capacity of


CODE_ERR_REQUEST_ENTITY_TOO_LARGE
the printer.

CODE_ERR_WAIT_REMOVAL Print command sent while waiting for label removal.

status
Status at the timing when the process was run is stored as the PrinterStatusInfo type.

printJobId
❏ When the spooler function has been enabled, a print job ID is stored.
❏ When the spooler function has been disabled, null is stored.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.
❏ When controlling multiple printers at a time, identify which printer has finished printing by comparing
the Printer object in the caller and the printerObj parameter.
❏ Check the details of automatic recovery errors and unrecoverable errors in getStatus.

166
Chapter 3 API Reference - Printer class

setGetPrinterSettingExListener
Registers a listener registration method for an event to notify the processing result of the devices from execution
of the getPrinterSettingEx API.

Syntax
public void
setGetPrinterSettingExListener(GetPrinterSettingExListener
listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface GetPrinterSettingExListener extends
EventListener
Listener registration method
void onGetPrinterSettingEx(Printer printerObj, int code,
String jsonString)
Parameter
printerObj
The callback source object is stored.

code
The processing result is stored.

Error status Description

CODE_SUCCESS Successful

CODE_ERR_PORT Error was detected with the communication port.

Processing did not end within the specified time


CODE_ERR_TIMEOUT
period.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_DEVICE_BUSY Used by other connection target.

CODE_ERR_FAILURE An unknown error occurred.

167
Chapter 3 API Reference - Printer class

jsonString
The acquired set value of the printer setting is stored in the JSON format.
Refer to JSON_Spec_sheet.pdf included in the package for more information.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ If the code is other than CODE_SUCCESS, "" (blank character) is stored in jsonString.
❏ If the getPrinterSettingEx API is executed in a non-supported printer, CODE_SUCCESS is stored in the
code, and "" (blank character) is stored in jsonString.

168
Chapter 3 API Reference - Printer class

setSetPrinterSettingExListener
Registers a listener registration method for an event to notify the processing result of the devices from execution
of the setPrinterSettingEx API.

Syntax
public void
setSetPrinterSettingExListener(SetPrinterSettingExListener
listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface SetPrinterSettingExListener extends
EventListener
Listener registration method
void onSetPrinterSettingEx(Printer printerObj, int code)
Parameter
printerObj
The callback source object is stored.

code
The processing result is stored.

Error status Description

CODE_SUCCESS Successful

CODE_ERR_PORT Error was detected with the communication port.

Sufficient memory required for processing could not


CODE_ERR_MEMORY
be allocated.

Processing did not end within the specified time


CODE_ERR_TIMEOUT
period.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_DEVICE_BUSY Used by other connection target.

CODE_ERR_RECOVERY_FAILURE Failed to recover the printer.

169
Chapter 3 API Reference - Printer class

Error status Description

CODE_ERR_JSON_FORMAT Invalid JSON format.

CODE_ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When controlling multiple printers, compare the call source Printer object and the printerObj parameter,
and identify the printer that has settings complete.
❏ If the setPrinterSettingEx API is executed in a non-supported printer, CODE_SUCCESS is stored in the
code, but printer settings will not be executed.

170
Chapter 3 API Reference - Printer class

interval
Updates the printer status (Printer.EVENT_POWER_OFF event) and specifies a notification interval. <obsolete>

Syntax
Setter
public void setInterval (int interval) throws Epos2Exception
Getter
public int getInterval ()
Value
Updates the printer status (Printer.EVENT_POWER_OFF event) and specifies a notification interval. The
default value is 3,000.

Value Description

Integer from 1000 to 60000 Interval to update the printer status (in milliseconds).

Printer.PARAM_DEFAULT Specifies the default value (3000).

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Supplementary explanation
Events other than Printer.EVENT_POWER_OFF are updated and notified at an interval of less than 1 second.
The update interval cannot be changed.

171
Chapter 3 API Reference - HybridPrinter class

HybridPrinter class

HybridPrinter
Initializes the HybridPrinter class.

Syntax
public HybridPrinter(int lang, Context context) throws
Epos2Exception
Parameter
lang
Specifies the language of the printer.

Value Description

HybridPrinter.MODEL_ANK English (ANK specification)

HybridPrinter.MODEL_JAPANESE Japanese

HybridPrinter.MODEL_CHINESE Simplified Chinese

HybridPrinter.MODEL_TAIWAN Traditional Chinese

HybridPrinter.MODEL_KOREAN Korean

HybridPrinter.MODEL_THAI Thai

HybridPrinter.MODEL_SOUTHASIA South Asian specification

context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

ERR_UNSUPPORTED A language not supported was specified.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

172
Chapter 3 API Reference - HybridPrinter class

connect
Starts communication with the printer.

Syntax
Public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.

• TM Printer Models
<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

USB "USB" Device node "USB:/dev/udev/*"

To connect to the printer via SSL/TLS communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCPS:192.168.192.168[local_pri


nter]"
Wi-Fi/Ethernet "TCPS" • MAC address
• Host name

• Customer Display Models


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

USB "USB" Device node "USB:/dev/udev/*"

173
Chapter 3 API Reference - HybridPrinter class

To connect to the printer via SSL/TLS communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCPS:192.168.192.168[local_pri


nter]"
Wi-Fi/Ethernet "TCPS" • MAC address
• Host name

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

HybridPrinter.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR _TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.

174
Chapter 3 API Reference - HybridPrinter class

❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ If you specify TCPS in the connection to a printer that does not support SSL/TLS communication,
ERR_PARAM is returned.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

175
Chapter 3 API Reference - HybridPrinter class

disconnect
Ends communication with the printer.

Syntax
Public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

Could not run the process.


ERR_PROCESSING Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
❏ When connected to the printer with Bluetooth, executing this API while a slip sheet is inserted by readMi-
crData causes the slip sheet to be ejected.
❏ Executing this API while waiting for paper insertion after executing waitInsertion, readMicrData, and
cleanMicrReader cancels waiting for paper insertion.
At that time, processing result of waitInsertion, readMicrData, and cleanMicrReader is not notified.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

176
Chapter 3 API Reference - HybridPrinter class

startMonitor
Enables printer status event notification.
Acquires and updates the printer status at the interval specified by the interval property and returns it to the
listener registration method registered by setStatusChangeEventListener.

Syntax
public void startMonitor() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


ERR_ILLEGAL
been started.

Supplementary explanation
During ESC/POS control, any ASB information items which have been changed during the update interval
specified by the interval property are reported.
During ePOS-Device XML control, the ASB information at the time of update is reported.

177
Chapter 3 API Reference - HybridPrinter class

stopMonitor
Disables status events.

Syntax
public void stopMonitor() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


ERR_ILLEGAL
been started.

178
Chapter 3 API Reference - HybridPrinter class

getStatus
Acquires the current status information.

Syntax
public HybridPrinterStatusInfo getStatus ()
Return value
The current status is returned in the HybridPrinterStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: HybridPrinter.TRUE Connected

Connection status HybridPrinter.FALSE Disconnected

HybridPrinter.TRUE Online
online:
HybridPrinter.FALSE Offline
Online status
HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.TRUE Cover is open.


coverOpen:
HybridPrinter.FALSE Cover is closed.
Cover status
HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.PAPER_OK Paper remains.

paper: HybridPrinter.PAPER_NEAR_END Paper is running out.

Paper status HybridPrinter.PAPER_EMPTY Paper has run out.

HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.TRUE Paper feed in progress


paperFeed:
HybridPrinter.FALSE Stopped
Paper feed
HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.SWITCH_ON Pressed
panelSwitch:
Panel switch (Feed button) sta- HybridPrinter.SWITCH_OFF Not pressed
tus
HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.DRAWER_HIGH High
drawer:
Drawer kick connector pin No.3 HybridPrinter.DRAWER_LOW Low
status
HybridPrinter.UNKNOWN Status is unknown.

179
Chapter 3 API Reference - HybridPrinter class

Printer status Status Description

HybridPrinter.NO_ERR Normal

HybridPrinter.MECHANICAL_ERR Mechanical error occurred.

errorStatus: HybridPrinter.AUTOCUTTER_ERR Auto cutter error occurred.

Error status HybridPrinter.UNRECOVER_ERR Unrecoverable error occurred.

HybridPrinter.AUTORECOVER_ERR Automatic recovery error occurred.

HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.HEAD_OVERHEAT Head overheat error

HybridPrinter.MOTOR_OVERHEAT Motor driver IC overheat error


autoRecoverError:
Automatic recovery error sta- HybridPrinter.WRONG_PAPER Paper error
tus
HybridPrinter.COVER_OPEN Cover is open.

HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter .INSERTION_WAIT_SLIP Waiting for slip sheet insertion

HybridPrinter .INSERTION_WAIT_VALI-
Waiting for validation sheet insertion
DATION
insertionWaiting:
Paper insertion wait status HybridPrinter.INSERTION_WAIT_MICR Waiting for slip sheet insertion

HybridPrinter.INSERTION_WAIT_NONE Not waiting for paper insertion

HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.REMOVAL_WAIT_PAPER Waiting for paper removal


removalWaiting:
HybridPrinter.REMOVAL_WAIT_NONE Not waiting for paper removal
Paper removal wait status
HybridPrinter.UNKNOWN Status is unknown.

HybridPrinter.SLIP_PAPER_OK Paper remains.


slipPaper:
Status of paper conveyance HybridPrinter.SLIP_PAPER_EMPTY Paper has run out.
route for the slip mechanism
HybridPrinter.UNKNOWN Status is unknown.

Supplementary explanation
❏ If this API is called while communication is not available, printer states other than "connection" will be
set to "Hybrid-Printer.UNKNOWN."
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ When a head overheat error occurs, HybridPrinter.UNKNOWN may be returned in autoRecoverError.
❏ HybridPrinter.INSERTION_WAIT_SLIP in insertionWaiting does not distinguish between slip sheet inser-
tion for slip printing and endorsement printing.

180
Chapter 3 API Reference - HybridPrinter class

sendData
Sends the print command and performs printing in the print method specified by selectPaperType.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class.

Syntax
public void sendData (int timeout) throws Epos2Execption
Parameter
timeout
Specifies the timeout period before completion of printing in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

The control commands have not been buffered.


ERR_ILLEGAL This API was called while no communication had
been started.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

181
Chapter 3 API Reference - HybridPrinter class

beginTransaction
Starts a transaction.
A transaction represents a single printing task such as printing a single sheet of receipt or coupon.
After this API is called, data until the transaction is terminated by endTransaction will be regarded as a single
printing task.

Syntax
public void beginTransaction() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


been started.
ERR_ILLEGAL
Another transaction had been already started by this
function.

ERR_FAILURE An unknown error occurred.

182
Chapter 3 API Reference - HybridPrinter class

endTransaction
Ends a transaction.
A transaction represents a single printing task such as printing a single sheet of receipt or coupon.
After beginTransaction is called, data until the transaction is terminated by this API will be regarded as a single
printing task.

Syntax
public void endTransaction() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


been started.
ERR_ILLEGAL
This API was called while no transaction had been
started.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
Do not execute this API during the period from paper insertion through paper eject during slip, endorse-
ment, validation, and MICR control.

183
Chapter 3 API Reference - HybridPrinter class

clearCommandBuffer
Clears the command buffer.
The contents buffered in the command buffer are retained until this API is called.

Syntax
public void clearCommandBuffer()

184
Chapter 3 API Reference - HybridPrinter class

selectPaperType
Specifies a print method.

Syntax
public void selectPaperType(int paperType) throws
Epos2Execption
Parameter
paperType
Specifies a print method.

Value Description

HybridPritner.PAPER_TYPE_RECEIPT Receipt printing

HybridPrinter.PAPER_TYPE_SLIP Slip printing

HybridPrinter.PAPER_TYPE_ENDORSE Endorsement printing

HybridPrinter.PAPER_TYPE_VALIDATION Validation printing

HybridPrinter.PARAM_DEFAULT Specifies the default (receipt printing).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

This API was called while no communication had


been started.
This API was called while waiting for paper insertion.
ERR_ILLEGAL This API was called while paper has already been
inserted.
This API was called while transmitting data.
This API was called while waiting for paper removal.

ERR_CONNECT Communication failed.

A print method not supported by the printer was


EPOS2_ERR_UNSUPPORTED
specified.

Supplementary explanation
The print method specified by this API affects waitInsertion and sendData APIs.

185
Chapter 3 API Reference - HybridPrinter class

waitInsertion
Causes the printer to wait for paper insertion.
After running this API, set the paper appropriate for the print method specified by the selectPaperType.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class.

Syntax
public void waitInsertion (int timeout) throws Epos2Execption
Parameter
timeout
Specifies the timeout period before completion of paper insertion in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

HybridPrinter.ERR_PARAM An invalid parameter was specified.

This API was called while no communication had


HybridPrinter.ERR_ILLEGAL
been started.

HybridPrinter.ERR_MEMORY Necessary memory could not be allocated.

HybridPrinter.ERR_FAILURE An unknown error occurred.

HybridPrinter.ERR_PROCESSING Could not run the process.

186
Chapter 3 API Reference - HybridPrinter class

cancelInsertion
Cancels the paper insertion wait status.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class.

Syntax
public void cancelInsertion () throws Epos2Execption
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


been started.
This API was called while receipt printing was speci-
fied as the print method.
This API was called while not waiting for paper inser-
ERR_ILLEGAL
tion.
This API was called while paper has already been
inserted.
This API was called while reading MICR.
This API was called while waiting for paper removal.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

187
Chapter 3 API Reference - HybridPrinter class

ejectPaper
Ejects the papers.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class when the eject command has been transmitted to the
printer.

Syntax
public void ejectPaper () throws Epos2Execption
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

This API was called while no communication had


ERR_ILLEGAL
been started.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
Cannot communicate with the printer until the paper ejected after receiving the callback is removed.

188
Chapter 3 API Reference - HybridPrinter class

readMicrData
Reads MICR data.
Inserting a slip sheet after executing this API starts reading MICR.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class.

Syntax
public void readMicrData (int micrFont, int timeout) throws
Epos2Execption
Parameter
micrFont
Specifies the font of characters to read.

Value Description

HybridPrinter.MICR_FONT_E13B Specifies E13B as the read font.

HybridPrinter.MICR_FONT_CMC7 Specifies CMC7 as the read font.

HybridPrinter.PARAM_DEFAULT Specifies the default value (font E13B).

timeout
Specifies the timeout period before completion of MICR reading in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

ERR_UNSUPPORTED The printer is not equipped with MICR.

This API was called while no communication had


ERR_ILLEGAL
been started.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

189
Chapter 3 API Reference - HybridPrinter class

cleanMicrReader
Cleans the MICR mechanism.
Inserting a cleaning sheet after executing this API starts cleaning the MICR mechanism.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPrinter class.

Syntax
public void cleanMicrReader (int timeout) throws
Epos2Execption
Parameter
timeout
Specifies the timeout period before completion of MICR mechanism cleaning in milliseconds.

Value Description

Integer from 5000 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

ERR_UNSUPPORTED The printer is not equipped with MICR.

This API was called while no communication had


ERR_ILLEGAL
been started.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

190
Chapter 3 API Reference - HybridPrinter class

forceRecover
Forcibly sends the error recovery command.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPritner class.

Syntax
public void forceRecover(int timeout) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_CONNECT Communication failed.

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

191
Chapter 3 API Reference - HybridPrinter class

forcePulse
Forcibly sends the drawer kick command.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPritner class.

Syntax
public void forcePulse(int drawer, int pulseTime, int timeout)
throws Epos2Exception
Parameter
drawer
Specifies the drawer kick connector.

Value Description

HybridPrinter.DRAWER_2PIN Drawer kick connector pin No.2

HybridPrinter.DRAWER_5PIN Drawer kick connector pin No.5

Specifies the default (drawer kick connector pin


HybridPrinter.PARAM_DEFAULT
No.2).

pulseTime
Specifies the on time of the drawer kick signal.

Value Description

HybridPrinter.PULSE_100 100-msec signal

HybridPrinter.PULSE_200 200-msec signal

HybridPrinter.PULSE_300 300-msec signal

HybridPrinter.PULSE_400 400-msec signal

HybridPrinter.PULSE_500 500-msec signal

HybridPrinter.PARAM_DEFAULT Specifies the default (100-msec signal).

timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (10000).

192
Chapter 3 API Reference - HybridPrinter class

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_CONNECT Communication failed.

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ The drawer and optional external buzzer cannot be connected simultaneously.
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

193
Chapter 3 API Reference - HybridPrinter class

forceCommand
Forcibly sends the ESC/POS command.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPritner class.

Syntax
public void forceCommand(byte[] data, int timeout) throws
Epos2Exception
Parameter
data
Forcibly sends the ESC/POS command.
Specifies the binary data.

timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_CONNECT Communication failed.

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

194
Chapter 3 API Reference - HybridPrinter class

forceReset
Forcibly sends the printer reset command.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListener API of the HybridPritner class.

Syntax
public void forceReset(int timeout) throws Epos2Exception
Parameter
timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

0 to 600000 Timeout period (in milliseconds)

HybridPrinter.PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_CONNECT Communication failed.

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ For TM-H6000V, the “Command execution during offline” setting must be enabled.
Refer to TM-H6000V Utility User’s Manual for more information.
❏ Available during ePOS-Device XML control.

195
Chapter 3 API Reference - HybridPrinter class

paperType
Acquires the print method setting information.

Syntax
Getter
public int getPaperType()
Value
Acquires the set print method information.

Value Description

HybridPritner.PAPER_TYPE_RECEIPT Specifies receipt printing.

HybridPrinter.PAPER_TYPE_SLIP Specifies slip printing.

HybridPrinter.PAPER_TYPE_ENDORSE Specifies endorsement printing.

HybridPrinter.PAPER_TYPE_VALIDATION Specifies validation printing.

Supplementary explanation
The selectPaperType API is used to change the set value.

196
Chapter 3 API Reference - HybridPrinter class

interval
Specifies the interval to update the printer status.

Syntax
Setter
public void setInterval (int interval) throws Epos2Exception
Getter
public int getInterval ()
Value
Specifies the interval to update the printer status (in milliseconds). The default value is 3000.

Value Description

Integer from 1000 to 600000 Interval to update the printer status (in milliseconds).

HybridPrinter.PARAM_DEFAULT Specifies the default value (3000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

Supplementary explanation
The new set value takes effect upon the next printer status notification.

197
Chapter 3 API Reference - HybridPrinter class

waitTime
Specifies the time from insertion of a paper to start of insertion operation.

Syntax
Setter
public void setWaitTime (int time) throws Epos2Exception
Getter
public int getWaitTime ()
Value
Default: 500

Value Description

Integer from 0 to 6400 Specifies the value in milliseconds.

HybridPrinter.PARAM_DEFAULT Specifies the default value (500).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

Supplementary explanation
Set values are rounded down to the nearest 100 milliseconds.
Example: 1 -> 0, 101 -> 100, 150 -> 100

198
Chapter 3 API Reference - HybridPrinter class

mode40Cpl
Enables or disables the 40cpl mode.

Syntax
Setter
public void setMode40Cpl (int mode) throws Epos2Exception
Getter
public int getMode40Cpl ()
Value
Default: 40cpl mode enabled

Value Description

HybridPrinter.TRUE 40cpl mode enabled

HybridPrinter.FALSE 40cpl mode disabled

HybridPrinter.PARAM_DEFAULT Specifies the default (40cpl mode enabled).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

Supplementary explanation
This API does not work in the page mode.

199
Chapter 3 API Reference - HybridPrinter class

setStatusChangeEventListener
Registers a listener registration method for a status change event.

Syntax
public void setStatusChangeEventListener
(StatusChangeListener statusChangeListener)
Parameter
statusChangeListener
Specifies an object which has a notification target method.

Listener interface
public interface StatusChangeListener extends EventListener
Listener registration method
void onHybdStatusChange(HybridPrinter hybridPrinterObj,
int eventType)
Parameter
hybridPrinterObj
The callback source object is stored.

eventType
The type of the event that occurred is stored.

Event type Description

HybridPrinter.EVENT_ONLINE Online

HybridPrinter.EVENT_OFFLINE Offline

HybridPrinter.EVENT_POWER_OFF Power off

HybridPrinter.EVENT_COVER_CLOSE Cover close

HybridPrinter.EVENT_COVER_OPEN Cover open

HybridPrinter.EVENT_PAPER_OK Paper remains.

HybridPrinter.EVENT_PAPER_NEAR_END Paper has almost run out.

HybridPrinter.EVENT_PAPER_EMPTY Paper has run out.

HybridPrinter.EVENT_DRAWER_HIGH Drawer kick connector pin No.3 status = "H"

HybridPrinter.EVENT_DRAWER_LOW Drawer kick connector pin No.3 status = "L"

HybridPrinter.EVENT_INSERTION_WAIT_SLIP Waiting for slip sheet insertion

HybridPrinter.EVENT_INSERTION_WAIT_VALIDATION Waiting for validation sheet insertion

HybridPrinter.EVENT_INSERTION_WAIT_MICR Waiting for slip sheet insertion

200
Chapter 3 API Reference - HybridPrinter class

Event type Description

HybridPrinter.EVENT_INSERTION_WAIT_NONE Not waiting for paper insertion

HybridPrinter.EVENT_REMOVAL_WAIT_PAPER Waiting for paper removal

HybridPrinter.EVENT_REMOVAL_WAIT_NONE Not waiting for paper removal

Paper remains in the paper conveyance route for the


HybridPrinter.EVENT_SLIP_PAPER_OK
slip mechanism

No paper in the paper conveyance route for the slip


HybridPrinter.EVENT_SLIP_PAPER_EMPTY
mechanism

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

201
Chapter 3 API Reference - HybridPrinter class

setReceiveEventListener
Registers a listener registration method for a print completion event.

Syntax
public void setReceiveEventListener (ReceiveListener
receiveListener)
Parameter
target
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onHybdReceive (HybridPrinter hybridPrinterObj, int
method, int code, String micrData, HybridPrinterStatusInfo
status)
Parameter
hybridPrinterObj
The callback source object is stored.

method
The method information is stored.

Method type Description

HybridPrinter.METHOD_WAITINSERTION Result of the waitInsertion API

HybridPrinter.METHOD_SENDDATA Result of the sendDataAPI

HybridPrinter.METHOD_CANCELINSERTION Result of the cancelInsertion API

HybridPrinter.METHOD_EJECTPAPER Result of the ejectPaper API

HybridPrinter.METHOD_READMICRDATA Result of the readMicrData API

HybridPrinter.METHOD_CLEANMICRREADER Result of the cleanMicrReader API

code
The processing result is stored.

Code Description

CODE_SUCCESS Printing was successful.

CODE_CANCELED Cancels the insertion wait status.

CODE_PRINTING Printing

202
Chapter 3 API Reference - HybridPrinter class

Code Description

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

CODE_ERR_FAILURE Error exists in the requested document syntax.

CODE_ERR_NOT_FOUND Printer specified by the device ID does not exist.

CODE_ERR_SYSTEM Error occurred with the printing system.

CODE_ERR_PORT Error was detected with the communication port.

CODE_ERR_TIMEOUT Print timeout occurred.

CODE_ERR_JOB_NOT_FOUND Specified job ID does not exist.

CODE_ERR_SPOOLER Print queue is full.

Print data exceeding the printer firmware capacity


CODE_ERR_TOO_MANY_REQUESTS
was transmitted.

Print data exceeding the maximum capacity per


CODE_ERR_REQUEST_ENTITY_TOO_LARGE
transfer was transmitted.

CODE_ERR_NO_MICR_DATA MICR read result does not exist.

CODE_ERR_ILLEGAL_LENGTH A slip sheet out of the standard was inserted.

CODE_ERR_NO_MAGNETIC_DATA Magnetic waveform cannot be detected.

CODE_ERR_RECOGNITION A character which cannot be analyzed was detected.

CODE_ERR_READ Error occurred during MICR read operation.

CODE_ERR_NOISE_DETECTED Noise error was detected.

Cover open error occurred during MICR read opera-


CODE_ERR_COVER_OPEN
tion.

Paper jam error occurred during MICR read opera-


CODE_ERR_PAPER_JAM
tion.

CODE_ERR_PAPER_PULLED_OUT Paper removal was detected.

CODE_ERR_CANCEL_FAILED Failed to cancel waiting for paper insertion.

Pinter operation differs from the specified print


CODE_ERR_PAPER_TYPE
method.

Could not run the process while waiting for paper


CODE_ERR_WAIT_INSERTION
insertion.

CODE_ERR_ILLEGAL The function was used in an illegal way.

203
Chapter 3 API Reference - HybridPrinter class

Code Description

Could not run the process while paper had already


CODE_ERR_INSERTED
been inserted.

Could not run the process while waiting for paper


CODE_ERR_WAIT_REMOVAL
removal.

The specified device is in process and the process


CODE_ERR_DEVICE_BUSY
cannot be executed.

micrData
MICR read data is stored.

status
Status at the timing when the process was run is stored as the HybridPrinterStatusInfo type.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.
❏ When controlling multiple printers at a time, identify which printer has finished printing by comparing
the HybridPrinter object in the caller and the hybridPrinterObj parameter.

204
Chapter 3 API Reference - LineDisplay class

LineDisplay class

LineDisplay
Initializes the LineDisplay class.

Syntax
public LineDisplay(int displaySeries, Context context) throws
Epos2Exception
Parameter
displaySeries
Specifies the model name of the target customer display.

Value Description

LineDisplay.DM_D110 DM-D110

LineDisplay.DM_D210 DM-D210

LineDisplay.DM_D30 DM-D30

LineDisplay.DM_D70 DM-D70

context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was specified.

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
❏ When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.
❏ When the DM-D30 connected to the TM-m30/TM-m30II/TM-m50/TM-T88VI/TM-T88VI-iHUB is replaced
with the DM-D70, specify LineDisplay.DM_D30 in displaySeries.

205
Chapter 3 API Reference - LineDisplay class

connect
Starts communication with the customer display.

Syntax
Public void connect (String target int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.

• Customer Display Models


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

To connect to the printer via SSL/TLS communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCPS:192.168.192.168[local_dis


play]"
Wi-Fi/Ethernet "TCPS" • MAC address
• Host name

206
Chapter 3 API Reference - LineDisplay class

• TM Printer + DM-D + barcode scanner model


To connect via Wi-Fi/Ethernet network communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_disp


lay]"
Wi-Fi/Ethernet "TCP" • MAC address
• Host name

To connect via Bluetooth or USB, specify using the following syntax.

Connec-
I/F Identifier Example
tion type

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• POS Terminal Model


<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_disp


• "TCP" lay]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

LineDisplay.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

207
Chapter 3 API Reference - LineDisplay class

Error status Description

Failed to communicate with the devices within the


ERR_TIMEOUT specified time.
The printer is offline.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ Devices other than printers are exclusively locked.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ When connecting through the USB, the identifiers that can be specified differ depending on the shape of
the USB connector.
When the identifier is omitted, Android OS connects with the USB device found first.
When the Android terminal is set to the developer mode, you may not be able to connect through USB-
A - Device Charging.

Shape of the USB connector


Identifier
USB-B USB-A - Device Charging

Device node ✔ -

USB Serial number - ✔

Omitted ✔ ✔

❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

208
Chapter 3 API Reference - LineDisplay class

disconnect
Ends communication with the customer display.

Syntax
Public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

209
Chapter 3 API Reference - LineDisplay class

getStatus
Acquires the current status information.

Syntax
public DisplayStatusInfo getStatus()
Return value
The current status is returned in the DisplayStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: LineDisplay.TRUE Connected

Connection status LineDisplay.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.
❏ If "FALSE" is returned when connecting a DM-D30 or DM-D70, the TM printer is not connected to the ter-
minal.

210
Chapter 3 API Reference - LineDisplay class

sendData
Sends the command buffer.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListenerAPI.
This API sends data buffered by an add-type API (e.g., addText).

Syntax
public void sendData() throw Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Processing could not be executed.

The control commands have not been buffered.


ERR_ILLEGAL This API was called while no communication had
been started.

211
Chapter 3 API Reference - LineDisplay class

clearCommandBuffer
Clears the command buffer.
The contents buffered in the command buffer are retained until this API is called.

Syntax
public void clearCommandBuffer()

212
Chapter 3 API Reference - LineDisplay class

addInitialize
Initializes the customer display. Initialization changes the customer display status as follows.
❏ All the displayed characters are erased and all the windows are destroyed.
❏ Cursor settings are initialized to the default and the cursor position is returned to the origin of the customer
display.
❏ The display blinking and brightness settings are initialized to the default.

Syntax
public void addInitialize ()
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

213
Chapter 3 API Reference - LineDisplay class

addCreateWindow
Adds window configuration to the command buffer.
Up to four windows can be configured.

Syntax
public int addCreateWindow(int number, int x, int y, int
width, int height, int scrollMode) throw Epos2Exception
Parameter
number
Specifies the window number.

Value Description

Integer from 1 to 4 Window number

x
Specifies the x coordinate of the window origin on the customer display.

Value Description

Integer from 1 to 44 X coordinate on the customer display

y
Specifies the y coordinate of the window origin on the customer display.

Value Description

Integer from 1 to 19 Y coordinate on the customer display

width
Specifies the window width.

Value Description

Integer from 1 to 44 Window width

height
Specifies the window height.

Value Description

Integer from 1 to 19 Window height

214
Chapter 3 API Reference - LineDisplay class

scrollMode
Specifies the window scroll mode.

Value Description

When the current display position is at the rightmost


position of the upper line, displaying a new character
moves the display position to the leftmost position
LineDisplay.SCROLL_OVERWRITE of the lower line. When the current display position is
at the rightmost position of the lower line, displaying
a new character moves the display position to the
leftmost position of the upper line.

When the current display position is at the rightmost


position of the upper line, displaying a new character
moves the display position to the leftmost position
LineDisplay.SCROLL_VERTICAL of the lower line. When the current display position is
at the rightmost position of the lower line, displaying
a new character scrolls up the characters on the
lower line and clears the lower line.

When the current display position is at the rightmost


position, displaying a new character scrolls all the
LineDisplay.SCROLL_HORIZONTAL characters already displayed on the cursor line to the
left by one character and the new character is dis-
played at the rightmost position.

LineDisplay.PARAM_DEFAULT Specifies the default value (Overwrite).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
To add a window, be careful so that the existing window(s) should not be overlapped by the new window
on the customer display.

215
Chapter 3 API Reference - LineDisplay class

addDestroyWindow
Adds a command to destroy the window defined by addCreateWindow to the command buffer.

Syntax
public void addDestroyWindow(int number) throw
Epos2Exception
Parameter
number
Specifies the number of the window to destroy.

Value Description

Integer from 1 to 4 Number of the window to destroy

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

216
Chapter 3 API Reference - LineDisplay class

addSetCurrentWindow
Adds a command to move to another window to the command buffer.
Specify one of the windows defined by addCreateWindow to set it as the new current window.
The cursor will move to the origin of the new window.

Syntax
public void addSetCurrentWindow(int number) throw
Epos2Exception
Parameter
number
Specifies a window number of a destination window.

Value Description

Integer from 1 to 4 Window number of a destination window

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

217
Chapter 3 API Reference - LineDisplay class

addClearCurrentWindow
Adds a window clear command for the current window to the command buffer.

Syntax
public void addClearCurrentWindow() throw Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

218
Chapter 3 API Reference - LineDisplay class

addCreateScreen
Adds the setting of the base window to the command buffer.
This API is used to call the layout setting of the base window having customer display.

Syntax
public void addCreateScreen(int mode) throws
Epos2Exception
Parameter
mode
Specifies the combination of the display area of the base window and the screen configuration (text/
image).

Installation Area
Value Screen configuration
method (columns × rows)

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_1 20 x 2
orientation portions.
Top: Text, Bottom: Image

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_2 20 x 2
orientation portions.
Top: Image, Bottom: Text

“Display in center”
Landscape
LineDisplay.LAYOUT_MODE_3 20 x 2 Only text is displayed at the center.
orientation
No division.

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_4 32 x 4
orientation portions.
Top: Text, Bottom: Image

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_5 32 x 4
orientation portions.
Top: Image, Bottom: Text

“Display in center”
Landscape
LineDisplay.LAYOUT_MODE_6 32 x 4 Only text is displayed at the center.
orientation
No division.

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_7 42 x 8
orientation portions.
Top: Text, Bottom: Image

219
Chapter 3 API Reference - LineDisplay class

Installation Area
Value Screen configuration
method (columns × rows)

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_8 42 x 8
orientation portions.
Top: Image, Bottom: Text

“Display in center”
Landscape
LineDisplay.LAYOUT_MODE_9 42 x 8 Only text is displayed at the center.
orientation
No division.

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_10 32 x 3
orientation portions.
Top: Text, Bottom: Image

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_11 32 x 3
orientation portions.
Top: Image, Bottom: Text

“Display in center”
Landscape
LineDisplay.LAYOUT_MODE_12 32 x 3 Only text is displayed at the center.
orientation
No division.

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_13 32 x 2
orientation portions.
Top: Text, Bottom: Image

“Horizontal split”
Landscape Divided equally into top and bottom
LineDisplay.LAYOUT_MODE_14 32 x 2
orientation portions.
Top: Image, Bottom: Text

“Display in center”
Landscape
LineDisplay.LAYOUT_MODE_15 32 x 2 Only text is displayed at the center.
orientation
No division.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

220
Chapter 3 API Reference - LineDisplay class

Supplementary explanation
If this API is executed, all items displayed in customer display are erased.

221
Chapter 3 API Reference - LineDisplay class

addCreateScreenCustom
Adds the setting of the base window to the command buffer.
This API enables the specification of width and height in the screen configuration of the base window having
customer display.

Syntax
public void addCreateScreenCustom(int mode, int column, int
row) throws Epos2Exception
Parameter
mode
Specifies the screen configuration of base window (text/image).

Installation
Value Screen configuration
method

“Full screen”
Landscape
LineDisplay.LANDSCAPE_LAYOUT_MODE_1 The text/image is displayed on the entire page.
orientation
No division.

“Vertical split”
Landscape
LineDisplay.LANDSCAPE_LAYOUT_MODE_2 Divided equally into left and right portions.
orientation
Left: Image, Right: Text

“Vertical split”
Landscape
LineDisplay.LANDSCAPE_LAYOUT_MODE_3 Divided equally into left and right portions.
orientation
Left: Text, Right: Image

“Horizontal split”
Landscape
LineDisplay.LANDSCAPE_LAYOUT_MODE_4 Divided equally into top and bottom portions.
orientation
Top: Text, Bottom: Image

“Horizontal split”
Landscape
LineDisplay.LANDSCAPE_LAYOUT_MODE_5 Divided equally into top and bottom portions.
orientation
Top: Image, Bottom: Text

“Full screen”
Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_1 The text/image is displayed on the entire page.
orientation
No division.

“Horizontal split”
Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_2 Divided equally into top and bottom portions.
orientation
Top: Text, Bottom: Image

“Horizontal split”
Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_3 Divided equally into top and bottom portions.
orientation
Top: Image, Bottom: Text

222
Chapter 3 API Reference - LineDisplay class

Installation
Value Screen configuration
method

“Horizontal split 1:2”


Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_4 Divided into top and bottom portions in the
orientation
ratio of 1:2. Top: Text, Bottom: Image

“Horizontal split 2:1”


Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_5 Divided into top and bottom portions in the
orientation
ratio of 2:1. Top: Image, Bottom: Text

“Horizontal split 2:1”


Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_6 Divided into top and bottom portions in the
orientation
ratio of 2:1. Top: Text, Bottom: Image

“Horizontal split 1:2”


Portrait
LineDisplay.PORTRAIT_LAYOUT_MODE_7 Divided into top and bottom portions in the
orientation
ratio of 1:2. Top: Image, Bottom: Text

column
Specifies the width (number of columns) of the base window display area.

Value Description

Effective specification range during landscape


Integer from 1 to 44
orientation

Effective specification range during portrait


Integer from 1 to 22
orientation

row
Specifies the height (number of rows) of the base window display area.

Value Description

Effective specification range during landscape


Integer from 1 to 13
orientation

Effective specification range during portrait


Integer from 1 to 19
orientation

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

223
Chapter 3 API Reference - LineDisplay class

Supplementary explanation
❏ If this API is executed, all items displayed in customer display are erased.
❏ Ignored when a value out of the effective specification range is specified in column, row.

224
Chapter 3 API Reference - LineDisplay class

addCreateTextArea
Adds the window setting to the command buffer.
A maximum of up to four windows can be set.

Syntax
public void addCreateTextArea(int number, int x, int y, int
width, int height, int scrollMode) throws Epos2Exception
Parameter
number
Specifies the window number.

Value Description

Integer from 1 to 4 Window number

x
Specifies the x-coordinate on the customer display of window origin.

Value Description

Integer from 1 to 44 x-coordinate on customer display

y
Specifies the y-coordinate on the customer display of window origin.

Value Description

Integer from 1 to 19 y-coordinate on customer display

width
Specifies the window width.

Value Description

Integer from 1 to 44 Window width

height
Specifies the window height.

Value Description

Integer from 1 to 19 Window height

225
Chapter 3 API Reference - LineDisplay class

scrollMode
Specifies the window scroll mode.

Value Description

If character display is performed when the display


position is at the upper right end, the display posi-
tion moves to the lower left end, and if character dis-
LineDisplay.SCROLL_OVERWRITE
play is performed when the display position is at the
lower right end, the display position moves to the
upper left end.

If character display is performed when the display


position is at the upper right end, the display posi-
tion moves to the lower left end, and if character dis-
LineDisplay.SCROLL_VERTICAL play is performed when the display position is at the
lower right end, the lower display characters that are
already displayed are scrolled to the top, and the
lower display is cleared.

If character display is performed when the display


position is at the right end, all display characters that
LineDisplay.SCROLL_HORIZONTAL are already displayed in the row with the cursor are
scrolled to the left by one character, and the new dis-
play characters are displayed at the right end.

LineDisplay.PARAM_DEFAULT Selects the default value (Overwrite)

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
When setting an additional window, take care that the already-set window and the setting range on the
customer display do not overlap.

226
Chapter 3 API Reference - LineDisplay class

addDestroyTextArea
Adds the deletion setting of the window defined in addCreateTextArea to the command buffer.

Syntax
public void addDestroyTextArea(int number) throws
Epos2Exception
Parameter
number
Specifies the window number to be deleted.

Value Description

Integer from 1 to 4 Window number to be deleted

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

227
Chapter 3 API Reference - LineDisplay class

addSetCurrentTextArea
Adds the change setting of the current window to the command buffer.
Specifies the window defined in addCreateTextArea, and sets it as the current window.
Moves the cursor to the origin position of the current window.

Syntax
public void addSetCurrentTextArea(int number) throws
Epos2Exception
Parameter
number
Specifies the destination window number.

Value Description

Integer from 1 to 4 Destination window number

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

228
Chapter 3 API Reference - LineDisplay class

addClearCurrentTextArea
Adds the display deletion in the current window to the command buffer.

Syntax
public void addClearCurrentTextArea() throws
Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

229
Chapter 3 API Reference - LineDisplay class

addSetCursorPosition
Adds cursor position setting to the command buffer.

Syntax
public void addSetCursorPosition(int x, int y) throw
Epos2Exception
Parameter
x
Specifies the destination x coordinate.

Value Description

Integer from 1 to 44 Destination x coordinate

y
Specifies the destination y coordinate.

Value Description

Integer from 1 to 19 Destination y coordinate

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Use addMoveCursorPosition to move within a window.
❏ In DM-D70 (Standard mode), the cursor position is set in the current window specified in addSetCurrent-
TextArea, with the top left as the origin.
If the window is not specified in addSetCurrentTextArea, set the cursor position in the base window, with
the top left as the origin.
❏ In DM-D70 (Column/row fixed mode), the cursor position is set in the base window, with the top left as
the origin.
❏ The value that can be specified in the x, y parameters varies depending on the customer display used
and its display modes, as well as the installation method.

230
Chapter 3 API Reference - LineDisplay class

x y

DM-D30

DM-D110
Integer from 1 to 20 Integer from 1 to 2
DM-D210

DM-D70 (Column/row fixed mode)

DM-D70 (Standard mode: Landscape orientation) Integer from 1 to 44 Integer from 1 to 13

DM-D70 (Standard mode: Portrait orientation) Integer from 1 to 22 Integer from 1 to 19

231
Chapter 3 API Reference - LineDisplay class

addMoveCursorPosition
Adds cursor position setting within the current window to the command buffer.

Syntax
public void addMoveCursorPosition(int position) throw
Epos2Exception
Parameter
position
Specifies the new cursor position within the current window.

Value Description

LineDisplay.MOVE_TOP_LEFT Sets the new position to the top left edge.

LineDisplay.MOVE_TOP_RIGHT Sets the new position to the top right edge.

LineDisplay.MOVE_BOTTOM_LEFT Sets the new position to the bottom left edge.

LineDisplay.MOVE_BOTTOM_RIGHT Sets the new position to the bottom right edge.

LineDisplay.PARAM_DEFAULT Specifies the default value (top left edge).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ In DM-D70 (Standard mode), move the cursor to the specified position from the origin of the window
specified in addSetCurrentTextArea.
If the window is not specified in addSetCurrentTextArea, move the cursor to the specified position from
the origin of the base window.
❏ In DM-D70 (Column/row fixed mode), move the cursor to the specified position from the origin of the
base window.

232
Chapter 3 API Reference - LineDisplay class

addSetCursorType
Adds cursor display setting to the command buffer.

Syntax
public void addSetCursorType(int type) throw Epos2Exception
Parameter
type
Specifies the cursor display method.

Value Description

LineDisplay.CURSOR_NONE No cursor display

LineDisplay.CURSOR_UNDERLINE Underscore

LineDisplay.PARAM_DEFAULT Specifies the default value (no cursor display).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

233
Chapter 3 API Reference - LineDisplay class

addText
Adds string display setting to the command buffer.

Syntax

❏ public void addText(String data) throws Epos2Exception

❏ public void addText(String data, int lang) throws


Epos2Exception

❏ public void addText(String data, int x, int y) throws


Epos2Exception

❏ public void addText(String data, int x, int y, int lang) throws


Epos2Exception

❏ public void addText(String data, int x, int y, int lang, int r, int
g, int b) throws Epos2Exception

Parameter
data
Specifies the string to display.

lang
Specifies the language to display the string.

Value Description

LineDisplay.LANG_EN (default) English

LineDisplay.LANG_JA Japanese

LineDisplay.LANG_MULTI Multiple languages (UTF-8)

LineDisplay.PARAM_DEFAULT Specifies the default value (English).

LineDisplay.PARAM_UNUSE Not used.

x
Specifies the x coordinate of the display position.

Value Description

Integer from 1 to 44 X coordinate of the display position

LineDisplay.PARAM_UNUSE Not used.

234
Chapter 3 API Reference - LineDisplay class

y
Specifies the y coordinate of the display position.

Value Description

Integer from 1 to 19 Y coordinate of the display position

LineDisplay.PARAM_UNUSE Not used.

r
Specifies the red color value of the string to be displayed.

Value Description

Integer from 0 to 255 Red color value

LineDisplay.PARAM_UNUSE Not used.

g
Specifies the green color value of the string to be displayed.

Value Description

Integer from 0 to 255 Green color value

LineDisplay.PARAM_UNUSE Not used.

b
Specifies the blue color value of the string to be displayed.

Value Description

Integer from 0 to 255 Blue color value

LineDisplay.PARAM_UNUSE Not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Parameters x and y specify coordinates with the origin at the top left of the customer display.
❏ If the coordinates of the display position are omitted, the coordinates of the cursor position upon execu-
tion of addText are used.
❏ The value that can be specified in the x, y parameters varies depending on the customer display used
and its display modes, as well as the installation method.

235
Chapter 3 API Reference - LineDisplay class

x y

DM-D30

DM-D110
1 to 20 1 to 2
DM-D210

DM-D70 (Column/row fixed mode)

DM-D70 (Standard mode: Landscape orientation) 1 to 44 1 to 13

DM-D70 (Standard mode: Portrait orientation) 1 to 22 1 to 19

❏ Specify the setting value in both x and y parameters.


If only a single parameter is specified, the Epos2Exception including the error status does not occur, but
nothing is displayed.
❏ Specify the r, g, b parameters in the RGB565 format.
❏ When changing the color of the string to be displayed, specify the setting value in all of the r, g, and b
parameters.
❏ If the setting value is specified in all of the r, g, and b parameters, the font color changes from the posi-
tion coordinates specified in the x, y parameters.
❏ If LineDisplay.LANG_MULTI is specified in the lang parameter, the font color returns to the default setting
of the customer display.
If the r, g, b parameters are specified after specifying LineDisplay.LANG_MULTI in the lang parameter,
then r, g, and b are processed after lang, and therefore, the font color specified in r, g, b is applied.

236
Chapter 3 API Reference - LineDisplay class

addReverseText
Adds reverse text display setting to the command buffer.

Syntax

❏ public void addReverseText(String data) throws


Epos2Exception

❏ public void addReverseText(String data, int lang) throws


Epos2Exception

❏ public void addReverseText(String data, int x, int y) throws


Epos2Exception

❏ public void addReverseText(String data, int x, int y, int lang)


throws Epos2Exception

Parameter
data
Specifies the string to display.

lang
Specifies the language to display the string.

Value Description

LineDisplay.LANG_EN (default) English

LineDisplay.LANG_JA Japanese

LineDisplay.PARAM_DEFAULT Specifies the default value (English).

x
Specifies the x coordinate of the display position.

Value Description

Integer from 1 to 20 X coordinate of the display position

y
Specifies the y coordinate of the display position.

Value Description

Integer from 1 to 2 Y coordinate of the display position

237
Chapter 3 API Reference - LineDisplay class

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Parameters x and y specify coordinates with the origin at the top left of the customer display.
❏ If the coordinates of the display position are omitted, the coordinates of the cursor position upon execu-
tion of addText are used.

238
Chapter 3 API Reference - LineDisplay class

addMarqueeText
Adds marquee display setting to the command buffer.
The marquee is displayed on a single line in the horizontal scroll mode, without regard to the scroll mode setting
of the display window.

Syntax
public void addMarqueeText(String data ,int format, int
unitWait, int repeatWait, int repeatCount, int lang) throws
Epos2Exception
Parameter
data
Specifies the string to display.

format
Specifies how to display the string.

Value Description

Displays the text from the rightmost position of the


LineDisplay.MARQUEE_WALK
window.

Displays the text from the leftmost position of the


LineDisplay.MARQUEE_PLACE
window.

LineDisplay.PARAM_DEFAULT Specifies the default value (Walk).

unitWait
Specifies the display interval per character (in milliseconds).

Value Description

Integer from 1 to 2000 Display interval per character (in milliseconds).

repeatWait
Specifies the display repeat interval (in milliseconds).

Value Description

Integer from 1 to 2000 Display repeat interval (in milliseconds)

repeatCount
Specifies the display repeat count.

Value Description

Integer from 1 to 127 Display repeat count

0 Unlimited

239
Chapter 3 API Reference - LineDisplay class

lang
Specifies the language to display the string.

Value Description

LineDisplay.LANG_EN English

LineDisplay.LANG_JA Japanese

LineDisplay.PARAM_DEFAULT Specifies the default value (English).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ When using DM-D30 or DM-D70 and when using a combination of TM-H6000V with DM-D110/DM-
D210, "0" is only allowed in repeatCount.
❏ When controlling DM-D30 or DM-D70, its marquee display may be distorted if the interval for displaying
text is too short due to the characteristics of the LCD.
For unitWait and repeatWait, the following values are recommended.
DM-D30: 600 msec or more
DM-D70: 100 msec or more

240
Chapter 3 API Reference - LineDisplay class

addSetBlink
Adds screen blink setting to the command buffer.

Syntax
public void addSetBlink(int interval) throws Epos2Exception
Parameter
interval
Specifies the blink interval (in milliseconds). The setting value is rounded to the nearest 50 milliseconds.

Value Description

Integer from 1 to 12700 Blink interval (in milliseconds)

0 Continuously lit

LineDisplay.PARAM_DEFAULT Specifies the default (continuously lit).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

241
Chapter 3 API Reference - LineDisplay class

addSetBrightness
Adds brightness setting of the customer display to the command buffer.

Syntax
publice void addSetBrightness(int brightness) throws
Epos2Exception
Parameter
brightness
Specifies the brightness value of the customer display.

Value Description

LineDisplay.BRIGHTNESS_20 Sets the customer display brightness to 20%.

LineDisplay.BRIGHTNESS_40 Sets the customer display brightness to 40%.

LineDisplay.BRIGHTNESS_60 Sets the customer display brightness to 60%.

LineDisplay.BRIGHTNESS_100 Sets the customer display brightness to 100%.

LineDisplay.PARAM_DEFAULT Specifies the default value (brightness 100%).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

242
Chapter 3 API Reference - LineDisplay class

addBackgroundColor
Adds the specification of the background color to the command buffer.
The background color from the beginning till the end of the row specified in the text area can be changed.

Syntax
public void addBackgroundColor(int row, int r, int g, int b)
throws Epos2Exception
Parameter
row
Specifies the row to which the background color is applied.

Value Description

Integer from 1 to 19 Changes the background color of the specified row.

LineDisplay.EVEN_ROWS Changes the background color of all even rows.

LineDisplay.ODD_ROWS Changes the background color of all odd rows.

LineDisplay.ALL_ROWS Changes the background color of all rows.

r
Specifies the red color value of the background color.

Value Description

Integer from 0 to 255 Red color value

g
Specifies the green color value of the background color.

Value Description

Integer from 0 to 255 Green color value

b
Specifies the blue color value of the background color.

Value Description

Integer from 0 to 255 Blue color value

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

243
Chapter 3 API Reference - LineDisplay class

Error status Description

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ To individually specify the background color in a plurality of windows, define the window in addSetCur-
rentTextArea before executing this API.
If the window is defined beforehand, the background color can be specified individually for each win-
dow.
By dividing the window at the position where the background color is to be changed, the background
color can be changed in the middle of the row.
❏ The background color can be applied only to the text area.
❏ Specify the r, g, b parameters in the RGB565 format.
❏ Specify the setting value in all of the r, g, and b parameters.
❏ To apply the background color to a plurality of rows, execute this API a plurality of times.

244
Chapter 3 API Reference - LineDisplay class

addStartSlideShow
Adds the start of the slide show to the command buffer.

Syntax
public void addStartSlideShow(int interval) throws
Epos2Exception
Parameter
interval
Specifies the switching period of the slide show (in milliseconds).

Value Description

Integer from 200 to 51000 Switching period of the slide show (in milliseconds)

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

245
Chapter 3 API Reference - LineDisplay class

addStopSlideShow
Adds the stopping of the slide show to the command buffer.

Syntax
public void addStopSlideShow() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

246
Chapter 3 API Reference - LineDisplay class

addDownloadImage
Adds the display of the image registered in addRegisterDownloadImage to the command buffer.

Syntax
public void addDownloadImage(int key1, int key2, int dotX,
int dotY, int width, int height) throws Epos2Exception
Parameter
key1
Specifies keycode 1 indicated in addRegisterDownloadImage.

Value Description

Integer from 0 to 255 Keycode 1

key2
Specifies keycode 2 indicated in addRegisterDownloadImage.

Value Description

Integer from 0 to 255 Keycode 2

dotX
Specifies the x-coordinate of the image display position, with the top left of the customer display as the ori-
gin.

Value Description

Effective specification range during landscape orien-


Integer from 0 to 799
tation

Effective specification range during portrait orienta-


Integer from 0 to 479
tion

dotY
Specifies the y-coordinate of the image display position, with the top left of the customer display as the ori-
gin.

Value Description

Effective specification range during landscape orien-


Integer from 0 to 479
tation

Effective specification range during portrait orienta-


Integer from 0 to 799
tion

247
Chapter 3 API Reference - LineDisplay class

width
Specifies the width display size (in dots) of the image.

Value Description

Integer from 0 to 1440 Width display size (in dots) of the image

height
Specifies the height display size (in dots) of the image.

Value Description

Integer from 0 to 1440 Height display size (in dots) of the image

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Can be used when the layout is specified in addCreateScreenCustom.
❏ To display in the size of the original image, specify 0 in both the width and height parameters.
❏ The image is not displayed if it does not fit into the display area.
❏ The image specified by this API is displayed in front of the text or image being displayed during the exe-
cution.
❏ When using a transmission image, use data in the png format.

248
Chapter 3 API Reference - LineDisplay class

addRegisterDownloadImage
Adds the registration of the image data to the command buffer.
The specified image data can be registered in the download graphics area of customer display, and can be called
by addDownloadImage.

Syntax
public void addRegisterDownloadImage(byte[] data, int key1,
int key2) throws Epos2Exception
Parameter
data
Specifies the binary data in the png format or jpg format.

key1
Specifies keycode 1.

Value Description

Integer from 48 to 57, 65 to 90, and 97 to 122 Keycode 1

key2
Specifies keycode 2.

Value Description

Integer from 48 to 57, 65 to 90, and 97 to 122 Keycode 2

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ This API cannot be used simultaneously with other APIs.
After executing this API, do not execute any other API until the callback is returned.
❏ Execute a sendData API after each execution of this API to register images one by one.
❏ If Epos2Exception including the error status occurs in the sendData execution results after the execution
of this API, restart the printer.
Depending on the system environment, it may take some time for the recovery process.
❏ If the power supply to the customer display is cut off, the registered image is erased.

249
Chapter 3 API Reference - LineDisplay class

❏ As the data size of the image to be registered increases, the processing time becomes longer. (Max. 320
seconds)
❏ If the data size of the image to be registered is large, and the communication environment is poor, the
image may not be registered in this API.
If the image cannot be registered in this API, use a dedicated Utility software.
For details on the dedicated Utility software, refer to the Technical Reference Guide of each customer dis-
play.
❏ If an image is registered in the specified keycode, it is overwritten and registered.
❏ Image data expressed in the pixel format of YCbCr422 or YCbCr420 can be used.
❏ The image size should be about 100 KB although the upper limit of the image size is 1.5 MB.
❏ Total size of images that can be registered is 1.5 MB.
This API converts the image format and pixel count so that the customer displays can process the images
and then register them. The conversion processing may increase the size of images, so ensure that there
is sufficient free space in the download graphics area to accommodate the total size of the images to be
registered.
No error is returned when registration was not successful due to insufficient free space in the download
graphics area.
❏ When using a transmission image, use data in the png format.
❏ Please use an image that matches the size of the image area in the customer display.
Using an image larger than the size of the image area will cause the image to be trimmed to fit the size of
the image area.

250
Chapter 3 API Reference - LineDisplay class

addNVImage
Adds the display of the image registered in the NV Graphics area of the customer display to the command buffer.

Syntax
public void addNVImage(int key1, int key2, int dotX, int dotY,
int width, int height) throws Epos2Exception
Parameter
key1
Specifies keycode 1 of NV Graphics.

Value Description

Integer from 0 to 255 Keycode 1

key2
Specifies keycode 2 of NV Graphics.

Value Description

Integer from 0 to 255 Keycode 2

dotX
Specifies the x-coordinate of the image display position, with the top left of the customer display as the ori-
gin.

Value Description

Effective specification range during landscape orien-


Integer from 0 to 799
tation

Effective specification range during portrait orienta-


Integer from 0 to 479
tion

dotY
Specifies the y-coordinate of the image display position, with the top left of the customer display as the ori-
gin.

Value Description

Effective specification range during landscape orien-


Integer from 0 to 479
tation

Effective specification range during portrait orienta-


Integer from 0 to 799
tion

251
Chapter 3 API Reference - LineDisplay class

width
Specifies the width display size (in dots) of the image.

Value Description

Integer from 0 to 1440 Width display size (in dots) of the image

height
Specifies the height display size (in dots) of the image.

Value Description

Integer from 0 to 1440 Height display size (in dots) of the image

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Can be used when the layout is specified in addCreateScreenCustom.
❏ To display in the size of the original image, specify 0 in both the width and height parameters.
❏ The image is not displayed if it does not fit into the display area.
❏ The image specified by this API is displayed in front of the text or image being displayed during the exe-
cution of the API.
❏ When using a transmission image, use data in the png format.
❏ Use the dedicated Utility software for registration of the image to the NV Graphics area of customer dis-
play.
For details, refer to the Technical Reference Guide of each customer display.

252
Chapter 3 API Reference - LineDisplay class

addClearImage
Adds the deletion of the image being displayed to the command buffer.

Syntax
public void addClearImage() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
In this API, the image displayed in the image area is deleted.
To delete the image displayed in the text area, initialize the customer display in addInitialize.

253
Chapter 3 API Reference - LineDisplay class

addSymbol
Adds the display of the two-dimensional symbol to the command buffer.

Syntax
public void addSymbol(java.lang.String data, int type, int level,
int width, int height, int dotX, int dotY, int quietZone) throws
Epos2Exception
Parameter
data
Specifies the two-dimensional symbol data as a string.
Specify a string in accordance with the standard of the two-dimensional symbol specified in type.

Type Description

QR Code Model 1 After converting the string to shift JIS, perform the escape sequence processing, select
the data type from the following, and perform encoding.
• Numbers: 0 to 9

QR Code Model 2 • Alphanumeric characters: 0 to 9, A to Z, space, $, %, *, +, -, ., /, :


• Kanji characters: Kanji characters that can be expressed in shift JIS
• 8-bit byte data: 0x00 to 0xff

When specifying binary data that cannot be expressed as a string, specify in the following escape sequence.

String Description

\xnn Control code (nn is specified in hexadecimals)

\\ Backslash

type
Specifies the type of the two-dimensional symbol.

Value Description

LineDisplay.SYMBOL_QRCODE_MODEL_1 QR Code Model 1

LineDisplay.SYMBOL_QRCODE_MODEL_2 QR Code Model 2

level
Specifies the error revision level.

Value Description

LineDisplay.LEVEL_L Error revision level L

LineDisplay.LEVEL_M Error revision level M

LineDisplay.LEVEL_Q Error revision level Q

LineDisplay.LEVEL_H Error revision level H

254
Chapter 3 API Reference - LineDisplay class

Value Description

LineDisplay.PARAM_DEFAULT Select the default value (error revision level M).

width
Specifies the module width (in dots).

Value Description

Effective specification range of QR Code (initial value:


Integer from 1 to 255 3)
Integer from 3 to 16

height
Specifies the module height (in dots).

Value Description

No effective specification range of QR Code. Since


Integer from 1 to 255 the QR Code is square, the specification of the height
is ignored.

dotX
Specifies the origin of the x-coordinate for displaying the two-dimensional symbol (in dots).

Value Description

Effective specification range during landscape orien-


Integer from 0 to 799
tation

Effective specification range during portrait orienta-


Integer from 0 to 479
tion

dotY
Specifies the origin of the y-coordinate for displaying the two-dimensional symbol (in dots).

Value Description

Effective specification range during landscape orien-


Integer from 0 to 479
tation

Effective specification range during portrait orienta-


Integer from 0 to 799
tion

quietZone
Specifies whether quiet zone assignment is enabled or disabled.

Value Description

LineDisplay.TRUE Enabled

LineDisplay.FALSE Disabled

255
Chapter 3 API Reference - LineDisplay class

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Can be used when the layout is specified in addCreateScreenCustom.
❏ In case there is overlapping with the display of text or image, the two-dimensional symbol is displayed
right in front.
❏ If the two-dimensional symbol data specified in data is not in accordance with the type of the two-
dimensional symbol specified in type, the error status is not returned and the two-dimensional symbol is
not displayed.
❏ If quiet zone assignment is enabled, a dot white margin (quiet zone) that is four times the value specified
in width is added at the top, bottom, left, and right of the two-dimensional symbol.
❏ To enable quiet zone assignment, specify a value in dotX and dotY, with top left of the quiet zone as the
origin.

256
Chapter 3 API Reference - LineDisplay class

addClearSymbol
Adds the deletion of the two-dimensional symbol being displayed to the command buffer.

Syntax
public void addClearSymbol() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
If the two-dimensional symbol being displayed overlaps the image, the image at the overlapping portion is
erased together with the two-dimensional symbol.

257
Chapter 3 API Reference - LineDisplay class

addShowClock
Adds time display setting to the command buffer.
Displaying the time clears all the displayed text. Additionally, sending other commands while the time is
displayed closes the time display.

Syntax
public void addShowClock() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

258
Chapter 3 API Reference - LineDisplay class

addCommand
Adds the ESC/POS command to the command buffer.

Syntax
public void addCommand(byte[] data) throws Epos2Exception
Parameter
data
Specifies the ESC/POS command.
Specifies the binary data.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ Refer to the following URL for details of the ESC/POS command.
https://reference.epson-biz.com/modules/ref_escpos_dm_d_en/
❏ Epson ePOS SDK does not check the commands sent using this API.
If the commands interfere with Epson ePOS SDK operations, other APIs may work wrongly or status val-
ues may become invalid.
This API should be used with a full understanding of ESC/POS commands and the customer display spec-
ifications.

259
Chapter 3 API Reference - LineDisplay class

setReceiveEventListener
Registers a listener registration method for a display completion event.

Syntax
public void setReceiveEventListener (ReceiveListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onDispReceive (LineDisplay displayObj, int code)
Parameter
displayObj
The callback source object is stored.

code
The processing result is stored.

Error status Description

CODE_SUCCESS Display completed.

CODE_ERR_NOT_FOUND The device was not found.

CODE_ERR_INVALID_WINDOW An unregistered window was specified.

An internal communication error with the device


CODE_ERR_PORT
occurred.

A timeout error occurred during communication


CODE_ERR_TIMEOUT
with the device.

The number of display data sent to the display has


CODE_ERR_TOO_MANY_REQUESTS
exceeded the allowable limit.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_COVER_OPEN Cover open error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_EMPTY No paper is left in the roll paper end detector.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

260
Chapter 3 API Reference - LineDisplay class

Error status Description

CODE_ERR_BATTERY_LOW Battery has run out.

CODE_ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.

261
Chapter 3 API Reference - Keyboard class

Keyboard class

Keyboard
Initializes the Keyboard class.

Syntax
public Keyboard(Context context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

262
Chapter 3 API Reference - Keyboard class

connect
Starts communication with the keyboard.

Syntax
Public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_key


• "TCP" board]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Keyboard.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

263
Chapter 3 API Reference - Keyboard class

Error status Description

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

264
Chapter 3 API Reference - Keyboard class

disconnect
Ends communication with the keyboard.

Syntax
Public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

265
Chapter 3 API Reference - Keyboard class

getStatus
Acquires the current status information.

Syntax
public KeyboardStatusInfo getStatus ()
Return value
The current status is returned in the KeyboardStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: Keyboard.TRUE Connected

Connection status Keyboard.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

266
Chapter 3 API Reference - Keyboard class

setPrefix
Sets the list of prefixes for string entry.
Sets a key code which is recognized as the start of a string to accept keyboard input as a sequence of strings.

Syntax
public void setPrefix(int[] prefixes) throws Epos2Exception
Parameter
prefixes
Specifies the key code arrangement.
Refer to Key code list for the key codes.
Specifying null disables setPrefix.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Communication failed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
Entering NULL or "" clears the current setting.

267
Chapter 3 API Reference - Keyboard class

getPrefix
Acquires the list of prefixes currently set.

Syntax
public int[] getPrefix()
Return value
The list of prefixes currently set by setPrefix is returned.

268
Chapter 3 API Reference - Keyboard class

setKeyPressEventListener
Registers a listener registration method for a key press event.

Syntax
public void setKeyPressEventListener (KeyPressListener
listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface KeyPressListener extends EventListener
Listener registration method
void onKbdKeyPress (Keyboard keyboardObj, int keyCode,
String ascii)
Parameter
keyboardObj
The callback source object is stored.

keyCode
The code of the pressed key is stored.

ascii
The character corresponding to the code of the pressed key is stored. If no character corresponds to the key
code, "" (blank character) is stored.
Depending on the keyboard used, double-byte characters may be entered.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

269
Chapter 3 API Reference - Keyboard class

setReadStringEventListener
Registers a listener registration method which receives characters starting with one of the strings specified by
setPrefix and ending with the Enter key as a string.

Syntax
public void setReadStringEventListener (ReadStringListener
listener
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReadStringListener extends EventListener
Listener registration method
void onKbdReadString (Keyboard keyboardObj, String
readString, int prefix)
Parameter
keyboardObj
The callback source object is stored.

readString
The detected string is stored.

prefix
Key code recognized as the start of a string is stored.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

270
Chapter 3 API Reference - POSKeyboard class

POSKeyboard class

PosKeyboard
Initializes the PosKeyboard class.

Syntax
public PosKeyboard(Context context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

271
Chapter 3 API Reference - POSKeyboard class

connect
Starts communication with the POS keyboard.

Syntax
public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
Specify the connection method using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Description
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_pos


• "TCP" keyboard]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Poskeyboard.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

272
Chapter 3 API Reference - POSKeyboard class

Error status Description

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The printer could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is a logical device name that is set when the POS keyboard is registered to the TM printer
(master). For details, refer to the TM-DT Series Peripheral Device Control Guide.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

273
Chapter 3 API Reference - POSKeyboard class

disconnect
Ends communication with the POS keyboard.

Syntax
public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

274
Chapter 3 API Reference - POSKeyboard class

getStatus
Acquires the current status information.

Syntax
public PosKeyboardStatusInfo getStauts()
Return value
The current status is returned in the PosKeyboardStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Keyboard status Status Description

connection: PosKeyboard.TRUE Connected

Connection status PosKeyboard.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

275
Chapter 3 API Reference - POSKeyboard class

setKeyPressEventListener
Registers a listener registration method for a key press event.

Syntax
public void setKeyPressEventListener(KeyPressListener
listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface KeyPressListener extends EventListener
Listener registration method
void onPosKbdKeyPress(PosKeyboard keyboardObj, int
posKeyCode)
Parameter
keyboardObj
The callback source object is stored.

posKeyCode
The code of the pressed key is stored.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

276
Chapter 3 API Reference - BarcodeScanner class

BarcodeScanner class

BarcodeScanner
Initializes the BarcodeScanner class.

Syntax
public BarcodeScanner(Context context) throws
Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

277
Chapter 3 API Reference - BarcodeScanner class

connect
Starts communication with the barcode scanner.

Syntax
Public void connect (String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.

• TM Printer + DM-D + barcode scanner model/


TM Printer + barcode scanner model
To connect via Wi-Fi/Ethernet network communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_scan


ner]"
Wi-Fi/Ethernet "TCP" • MAC address
• Host name

To connect via Bluetooth or USB, specify using the following syntax.


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• POS Terminal Model


<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_scan


• "TCP" ner]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

278
Chapter 3 API Reference - BarcodeScanner class

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

BarcodeScanner.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ When connecting through the USB, the identifiers that can be specified differ depending on the shape of
the USB connector.
When the identifier is omitted, Android OS connects with the USB device found first.
When the Android terminal is set to the developer mode, you may not be able to connect through USB-
A - Device Charging.

279
Chapter 3 API Reference - BarcodeScanner class

Shape of the USB connector


Identifier
USB-B USB-A - Device Charging

Device node ✔ -

USB Serial number - ✔

Omitted ✔ ✔

❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Set the barcode scanner suffix to CR (carriage return code). Data cannot be obtained using any other set-
tings.
❏ Devices other than printers are exclusively locked. Do not control the scanner and printer connected to
the scanner from multiple applications at the same time.
❏ If a combination of TM Printer + barcode scanner is used on a connection established via Bluetooth or
USB, the barcode data read during printing is notified after the printing is complete.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

280
Chapter 3 API Reference - BarcodeScanner class

disconnect
Ends communication with the barcode scanner.

Syntax
Public void disconnect () throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

281
Chapter 3 API Reference - BarcodeScanner class

getStatus
Acquires the current status information.

Syntax
public ScannerStatusInfo getStatus ()
Return value
The current status is returned in the ScannerStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: BarcodeScanner.TRUE Connected

Connection status BarcodeScanner.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.
❏ If a combination of TM Printer + barcode scanner is used on a connection established via Bluetooth or
USB, the connection status of TM Printer and the barcode scanner is obtained. If the combination is used
by some other connection method, the connection status of the smart device and TM Printer is
obtained.

282
Chapter 3 API Reference - BarcodeScanner class

setScanEventListener
Registers a listener registration method for a barcode data entry event.

Syntax
public void setScanEventListener (ScanListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ScanListener extends EventListener
Listener registration method
void onScanData (BarcodeScanner scannerObj, String
scanData)
Parameter
scannerObj
The callback source object is stored.

scanData
The detected string is stored.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ The notification timing of the barcode data entry event differs depending on how it is connected. Refer
to the description of the target parameter of the connect API for details.

283
Chapter 3 API Reference - MSR class

MSR class

Msr
Initializes the Msr class.

Syntax
public Msr(Context context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

284
Chapter 3 API Reference - MSR class

connect
Starts communication with the MSR.

Syntax
public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
Specify the connection method using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Description
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_msr


• "TCP" ]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Msr.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

285
Chapter 3 API Reference - MSR class

Error status Description

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The printer could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is set when the MSR is registered to the TM printer (master).
The value differs depending on the control method.

Control method Device ID Reference

TM-DT Series Peripheral Device Control


Device control program Logical device name
Guide

Device control script Arbitrary character string Technical Reference Guide of the printer

❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

286
Chapter 3 API Reference - MSR class

disconnect
Ends communication with the MSR.

Syntax
public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

287
Chapter 3 API Reference - MSR class

getStatus
Acquires the current status information.

Syntax
public MsrStatusInfo getStauts()
Return value
The current status is returned in the MsrStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Keyboard status Status Description

connection: Msr.TRUE Connected

Connection status Msr.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

288
Chapter 3 API Reference - MSR class

setDataEventListener
Registers a listener registration method for a card data detection event.

Syntax
public void setDataEventListener(DataListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface DataListener extends EventListener
Listener registration method
void onData(Msr msrObj, Data data)
Parameter
msrObj
The callback source object is stored.

data
Acquires the read card data.
The result is stored in the Data structure.

Property Description

String track1 Entire data of track 1

String track2 Entire data of track 2

String track4 Entire data of track 4 (JIS2 track)

String accountNumber Account number

String expirationData Expiration date ("YYMM" format)

String surname Surname

String firstName First Name

String middleInitial Middle name/initial

String title Title

String serviceCode Service code

String track1_dd Arbitrary data of track 1

String track2_dd Arbitrary data of track 2

289
Chapter 3 API Reference - MSR class

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

290
Chapter 3 API Reference - SimpleSerial class

SimpleSerial class

SimpleSerial
Initializes the SimpleSerial class.

Syntax
public SimpleSerial(Context context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

291
Chapter 3 API Reference - SimpleSerial class

connect
Starts communication with the serial communication device.

Syntax
Public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
Specify the connection method using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_seri


• "TCP" al]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

SimpleSerial.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

292
Chapter 3 API Reference - SimpleSerial class

Error status Description

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

293
Chapter 3 API Reference - SimpleSerial class

disconnect
Ends communication with the serial communication device.

Syntax
Public void disconnect () throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

294
Chapter 3 API Reference - SimpleSerial class

getStatus
Acquires the current status information.

Syntax
public SerialStatusInfo getStatus ()
Return value
The current status is returned in the SerialStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: SimpleSerial.TRUE Connected

Connection status SimpleSerial.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

295
Chapter 3 API Reference - SimpleSerial class

sendCommand
Transfers a command.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the listener registration method set by the
setReceiveEventListenerAPI.

Syntax
public void sendCommand(byte[] data) throws
Epos2Exception
Parameter
data
Specifies the command.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

This API was called while no communication had


ERR_ILLEGAL
been started.

296
Chapter 3 API Reference - SimpleSerial class

setReceiveEventListener
Registers a listener registration method for a reception event from the device.

Syntax
public void setReceiveEventListener(ReceiveListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onSimpleSerialReceive (SimpleSerial serialObj, byte[]
data)
Parameter
serialObj
The callback source object is stored.

data
Receives reception data.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.

297
Chapter 3 API Reference - GermanyFiscalElement Class

GermanyFiscalElement Class

GermanyFiscalElement
Initializes the GermanyFiscalElement class.

Syntax
public GermanyFiscalElement(android.content.Context
context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.
When using it with multiple printers connected, make sure to generate a dedicated instance for each
printer.

298
Chapter 3 API Reference - GermanyFiscalElement Class

connect
Starts communication with German fiscal element (TSE).

Syntax
public void connect(java.lang.String target,int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
The connection method varies according to the system configuration.

• TM Printer Models
<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• Customer Display Models


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168"


Wi-Fi/Ethernet "TCP" • MAC address
• Host name

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

To connect to the printer via SSL/TLS communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

299
Chapter 3 API Reference - GermanyFiscalElement Class

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCPS:192.168.192.168[local_TS


E]"
Wi-Fi/Ethernet "TCPS" • MAC address
• Host name

• TM Printer + DM-D + barcode scanner model/


TM Printer + barcode scanner model
To connect via Wi-Fi/Ethernet network communication, specify using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_TSE


]"
Wi-Fi/Ethernet "TCP" • MAC address
• Host name

The device ID is fixed as [local_TSE].

To connect via Bluetooth or USB, specify using the following syntax.


<connection type>:<identifier>

Connec-
I/F Identifier Example
tion type

Bluetooth "BT" BD address "BT:00:22:15:7D:70:9C"

• Device node "USB:/dev/udev/*"


"USB:000000000000000000"
USB "USB" • USB Serial number
"USB:"
• Omitted

• POS Terminal Model


<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_TSE


• "TCP" ]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

300
Chapter 3 API Reference - GermanyFiscalElement Class

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Print.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ When communication with the printer is no longer necessary, be sure to call disconnect to terminate it.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ The printer status is returned to the event registered with the Printer class.
For details, refer to Chapter 2 "Programming Flow" and Chapter 6 "To use the same printer from multiple
mobile devices."
❏ The device ID is an arbitrary character string that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the Technical Reference Guide of each printer.
❏ If you are using DHCP to assign the IP address of the printer, specify the MAC address or host name of the
printer as the identifier.

301
Chapter 3 API Reference - GermanyFiscalElement Class

❏ If you specify the host name of the printer as the identifier, use in the environment where it can be found
by the DNS server.
❏ When connecting through the USB, the identifiers that can be specified differ depending on the shape of
the USB connector.
When the identifier is omitted, Android OS connects with the USB device found first.
When the Android terminal is set to the developer mode, you may not be able to connect through USB-
A - Device Charging.

Shape of the USB connector


Identifier
USB-B USB-A - Device Charging

Device node ✔ -

USB Serial number - ✔

Omitted ✔ ✔

❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

302
Chapter 3 API Reference - GermanyFiscalElement Class

disconnect
Ends communication with the German fiscal element (TSE).

Syntax
public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing.

303
Chapter 3 API Reference - GermanyFiscalElement Class

getStatus
Acquires the connection status with German fiscal element (TSE).

Syntax
public GermanyFiscalElementStatusInfo getStatus()
Return value
The current status is returned in the GermanyFiscalElementStatusinfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: GermanyFiscalElement.TRUE Connected

Connection status GermanyFiscalElement.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

304
Chapter 3 API Reference - GermanyFiscalElement Class

operate
Sends a JSON string to German fiscal element (TSE).
The processing result of the device using this API is notified to the listener registration method set by
setReceiveEventListener of the GermanyFiscalElement class.

Syntax
public void operate(java.lang.String jsonString, int timeout)
throws Epos2Exception
Parameter
jsonString
Specifies the JSON string to send to German fiscal element (TSE).

timeout
Specifies the timeout period before completion of command transmission in milliseconds.

Value Description

Maximum wait time before an error is returned (in


Integer from 5000 to 120000
milliseconds).

PARAM_DEFAULT Specifies the default value (10000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

This API was called while no communication had


ERR_ILLEGAL
been started.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Supplementary explanation
❏ Immediately after starting the printer, do not execute this API until the LED is lit.
Execution takes time, and a timeout error may occur.
❏ ERR_PROCESSING occurs if this API is executed during printer processing.
Therefore, execute this API after receiving the processing complete callback.
❏ ERR_PARAM is returned if null is specified as the JSON string, or if the size of jsonString to be sent is 64
KByte or more.

305
Chapter 3 API Reference - GermanyFiscalElement Class

setReceiveEventListener
Registers the listener registration method for response document receive events.

Syntax
public void setReceiveEventListener(ReceiveListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onGfeReceive (GermanyFiscalElement germanyFiscalObj,
int code, String data)
Parameter
gfeObj
The callback source object is stored.

code
The processing result is stored.

Error status Description

CODE_SUCCESS Processed successfully.

Failed to communicate with the devices within the


CODE_ERR_TIMEOUT
specified time.

An internal communication error with the device


CODE_ERR_PORT
occurred.

CODE_ERR_GET_JSON_SIZE Failed to acquire the JSON string.

CODE_ERR_AUTORECOVER Automatic recovery error occurred.

CODE_ERR_UNRECOVERABLE Unrecoverable error occurred.

CODE_ERR_CUTTER Auto cutter error occurred.

CODE_ERR_MECHANICAL Mechanical error occurred.

CODE_ERR_NOT_FOUND The device was not found.

The specified device is in process and the process


CODE_ERR_DEVICE_BUSY
cannot be executed.

data
Processing results are stored in the JSON string.

306
Chapter 3 API Reference - GermanyFiscalElement Class

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.

307
Chapter 3 API Reference - OtherPeripheral class

OtherPeripheral class

OtherPeripheral
Initializes the OtherPeripheral class.

Syntax
public OtherPeripheral(Context context) throws
Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

308
Chapter 3 API Reference - OtherPeripheral class

connect
Starts communication with the peripheral device.

Syntax
public void connect(String target, int timeout) throws
Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
Specify the connection method using the following syntax.
<connection type>:<identifier>[<device ID>]

Connec-
I/F Identifier Description
tion type

• IP address in IPv4 format "TCP:192.168.192.168[local_othe


• "TCP" r]"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

Otherperipheral.PARAM_DEFAULT Specifies the default value (15000).

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Failed to open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Tried to start communication with a printer with


which communication had been already established.
ERR_ILLEGAL
Tried to start communication with a printer during
reconnection process.

ERR_MEMORY Necessary memory could not be allocated.

309
Chapter 3 API Reference - OtherPeripheral class

Error status Description

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

ERR_NOT_FOUND The device could not be found.

ERR_IN_USE The device was in use.

ERR_TYPE_INVALID The device type is different.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ The device ID is a logical device name that is set when the peripheral device is registered to the TM
printer (master).
For details, refer to the TM-DT Series Peripheral Device Control Guide.
❏ When using multi-threading to connect to multiple printers or peripheral devices, this API and discon-
nect cannot be started for other printers or peripheral devices until this API finishes processing. Start the
next process after this API finishes processing.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

310
Chapter 3 API Reference - OtherPeripheral class

disconnect
Ends communication with the peripheral device.

Syntax
public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

Tried to end communication where it had not been


ERR_ILLEGAL
established.

ERR_MEMORY Necessary memory could not be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Failed to disconnect the device.


ERR_DISCONNECT Tried to terminate communication with a printer
during reconnection process.

Supplementary explanation
When using multi-threading to connect to multiple printers or peripheral devices, this API and connect
cannot be started for other printers or peripheral devices until this API finishes processing. Start the next
process after this API finishes processing.

311
Chapter 3 API Reference - OtherPeripheral class

getStatus
Acquires the current status information.

Syntax
public OtherPeripheralStatusInfo getStauts()
Return value
The current status is returned in the OtherPeripheralStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Keyboard status Status Description

connection: OtherPeripheral.TRUE Connected

Connection status OtherPeripheral.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

312
Chapter 3 API Reference - OtherPeripheral class

sendData
Sends data to the peripheral device.
Specifies the arbitrary function of the device control program side, and passes JSON data made from a set of the
property name and value.
For details, refer to the TM-DT Series Peripheral Device Control Guide.
The processing result of this API is notified to the listener registration method set by the setReceiveEventListener
API.

Syntax
public void sendData(String methodName, String data) throws
Epos2Exception
Parameter
methodName
Specifies the function name to be executed.

data
Specifies the parameter to be passed to the function in JSON string.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Communication failed.

Sufficient memory required for processing could not


ERR_MEMORY
be allocated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

313
Chapter 3 API Reference - OtherPeripheral class

setReceiveEventListener
Registers a listener registration method for a notification of reception data from the peripheral device event.

Syntax
public void setReceiveEventListener(ReceiveListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onOtherReceive(OtherPeripheral otherObj,
java.lang.String eventName, String data)
Parameter
otherObj
The callback source object is stored.

eventName
The event name is stored.

data
Reception data is stored in the JSON string.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.

314
Chapter 3 API Reference - CommBox class

CommBox class

CommBox
Initializes the CommBox class.

Syntax
public CommBox(Context context) throws Epos2Exception
Parameter
context
Specifies the application context.
Null can be specified when the log output function is not used.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_MEMORY Necessary memory could not be allocated.

Supplementary explanation
When iterating a process, be sure to generate and destroy instances outside the iterated process and not
iterate the process at a short interval.
Memory releasing by the OS may affect the process of the Epson ePOS SDK, resulting in an invalid opera-
tion.

315
Chapter 3 API Reference - CommBox class

connect
Starts communication with the communication box.

Syntax
public void connect(String target, int timeout, String myId)
throws Epos2Exception
Parameter
target
Specifies the method of connecting to the printer by a character string.
Specify the connection method using the following syntax.
<connection type>:<identifier>[<box ID>]

Connec-
I/F Identifier Example
tion type

• IP address in IPv4 format "TCP:192.168.192.168[Box1]"


• "TCP"
Wi-Fi/Ethernet • MAC address
• "TCPS"
• Host name

To connect to the printer via SSL/TLS communication, specify TCPS in the connection type.

timeout
Specifies the maximum time (in milliseconds) to wait for communication with the printer to be established.

Value Description

Maximum wait time before an error is returned (in


Integer from 1000 to 300000
milliseconds).

CommBox.PARAM_DEFAULT Specifies the default value (15000).

myId
Specifies a member ID to identify the application itself in the communication box.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Could not open the device.

Failed to communicate with the devices within the


ERR_TIMEOUT
specified time.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

316
Chapter 3 API Reference - CommBox class

Error status Description

ERR_PROCESSING Could not run the process.

ERR_ALREADY_OPENED Communication box is already open.

ERR_ALREADY_USED Specified member ID is already in use.

The number of created communication boxes has


ERR_BOX_COUNT_OVER
exceeded the upper limit.

The number of members belong to the communica-


ERR_BOX_CLIENT_OVER
tion box has exceeded the upper limit.

ERR_RECOVERY_FAILURE Failed to recover the printer.

Supplementary explanation
❏ This API will succeed regardless of the connection status of the TM printer (master) and peripheral
devices.
❏ Devices other than printers are exclusively locked.
❏ If Epos2Exception including ERR_RECOVERY_FAILURE occurs, restart the printer.

317
Chapter 3 API Reference - CommBox class

disconnect
Ends communication with the communication box.

Syntax
public void disconnect() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Communication failed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

318
Chapter 3 API Reference - CommBox class

getStatus
Acquires the current status information.

Syntax
public CommBoxStatusInfo getStatus ()
Return value
The current status is returned in the CommBoxStatusInfo type.
The following status information is stored in the object as a property.
Stored status information can be acquired using the getter method of each property.

Printer status Status Description

connection: CommBox.TRUE Connected

Connection status CommBox.FALSE Disconnected

Supplementary explanation
❏ The status object is set to the status at the timing of execution of this API and will not be updated.
❏ If this function is executed within a callback function, null will be returned.

319
Chapter 3 API Reference - CommBox class

getCommHistory
Acquires the transmission history of the communication box.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the set listener registration method.

Syntax
public void getCommHistory(GetCommHistoryCallback
callback) throws Epos2Exception
Parameter
callback
Specifies an object which has a notification target method.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_CONNECT Communication failed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Listener interface
public interface GetCommHistoryCallback extends
EventListener
Definition of the listener registration method
void onGetCommHistory(CommBox commBoxObj, int code,
ArrayList<HashMap<String, String>> historyList
Parameter
commBoxObj
The callback source object is stored.

code

Error status Description

SUCCESS Processed successfully.

CODE_ERR_FAILURE An unknown error occurred.

320
Chapter 3 API Reference - CommBox class

historyList
The transmission history of the communication box is stored.

historyList[index]

Key Description

The member ID of the transmitter is stored.


String senderId If no member ID was specified when running the
connect method, "" (blank character) is set.

The member ID of the receiver is stored.


String receiverId If data was sent to all the members of the communi-
cation box, "" (blank character) is set.

String message Received data is set.

321
Chapter 3 API Reference - CommBox class

sendMessage
Sends a message to the communication box.
The error status of this API is the result of sending data to the devices.
The processing result of the devices using this API is notified to the set listener registration method.

Syntax
public void sendMessage (String message, String
targetId,SendMessageCallback callback) throws
Epos2Exception
Parameter
message
Specifies data to send to the communication box.

targetId
Specifies the member ID of the receiver.
When null or "" (blank character) is specified, data is sent to all the members other than the transmitter.

callback
Specifies an object which has a notification target method.

Exception
When the process fails, Epos2Exception with one of the following error value occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

This API was called while no communication had


ERR_ILLEGAL
been started.

Listener interface
public interface SendMessageCallback extends EventListener
Definition of the listener registration method
void onCommBoxSendMessage (CommBox commBoxObj,int
code, int count)
Parameter
commBoxObj
The callback source object is stored.

322
Chapter 3 API Reference - CommBox class

code

Error status Description

CODE_SUCCESS Processed successfully.

CODE_ERR_NOT_FOUND Specified member ID cannot be found.

CODE_ERR_FAILURE An unknown error occurred.

count
Number of clients which tried to send the message is stored.

323
Chapter 3 API Reference - CommBox class

setReceiveEventListener
Registers a listener registration method for a message reception event of the communication box.

Syntax
public void setReceiveEventListener (ReceiveListener listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ReceiveListener extends EventListener
Listener registration method
void onCommBoxReceive(CommBox commBoxObj, String
senderId, String receiverId String message
Parameter
commBoxObj
The callback source object is stored.

senderId
The member ID of the transmitter is stored.
If no member ID was specified when a transmitting member run the connect method, "" (blank character) is
set.

receiverId
The member ID of the receiver is stored.
If data was sent to all the members of the communication box, "" (blank character) is set.

message
The received message is stored.

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ When a communication error occurs during ePOS-Device XML control, communication disconnection is
not notified.
To notify the disconnection event, implement the setConnectionEventListener.

324
Chapter 3 API Reference - Common to all classes

Common to all classes

getAdmin
Acquires the administrator name set with printer.

Syntax
public String getAdmin()
Return value
A string for the administrator name.

Supplementary explanation
❏ If not set, "" (blank character) is returned for the TM printer.
❏ The administrator name is set by EPSON TMNet WebConfig.
❏ This API cannot be used with Bluetooth communication.

325
Chapter 3 API Reference - Common to all classes

getLocation
Acquires the installation location information set with printer.

Syntax
public String getLocation()
Return value
A string for the installation location.

Supplementary explanation
❏ If not set, "" (blank character) is returned for the TM printer.
❏ The installation location information is set by EPSON TMNet WebConfig.
❏ This API cannot be used with Bluetooth communication.

326
Chapter 3 API Reference - Common to all classes

setConnectionEventListener
Registers a listener registration method which receives a notification that a reconnection process has been
started.
Be sure to perform a process (e.g., display a message to indicate that reconnection has been started) when
setConnectionEventListener is run.

Syntax
public void setConnectionEventListener (ConnectionListener
listener)
Parameter
listener
Specifies an object which has a notification target method.

Listener interface
public interface ConnectionListener extends EventListener
Listener registration method
void onConnection(Object deviceObj, int eventType)
Parameter
deviceObj
The callback source object is stored.

eventType
The type of the event that occurred is stored.

Event type Description

*.EVENT_RECONNECTING Reconnection start event

*. EVENT_RECONNECT Reconnection completion event

*. EVENT_DISCONNECT Disconnection event

Supplementary explanation
❏ When this API is run multiple times, the listener registration method specified later takes effect.
❏ If null is specified in listener when calling this API, the registered listener registration method is canceled.
❏ It takes about 30 seconds for the disconnection event to occur after the disconnection.
❏ Do not make any call operation when *.EVENT_RECONNECTING has occurred.
Wait until *.EVENT_RECONNECT or *.EVENT_DISCONNECT occurs.
❏ *. EVENT_DISCONNECT occurs in the following cases:
When disconnect is running
When connection fails after occurrence of *.EVENT_RECONNECTING

327
Chapter 3 API Reference - Common to all classes

❏ When *. EVENT_DISCONNECT occurs, it is not necessary to call disconnect.


When disconnect is called, an exception with ERR_ILLEGAL stored in Epos2Exception will occur.

328
Chapter 3 API Reference - Discovery class

Discovery class

start
Starts searching for the specified device type.
An event is generated for each device detected.

Syntax
public static synchronized void start(Context context,
FilterOption filterOption,DiscoveryListener listener) throws
Epos2Exception
Parameter
context
Sets an instance of the Context class for the caller.
Example) Sets Context acquired by getBaseContext() within Activity.

filterOption
In order to filter the search result, set the filter option in the FilterOption type and specify it in the parame-
ter. When null is specified, search is run with the default settings.
The following information is stored in the FilterOption type.
❏ portType
Selects the port to search.

Value Description

Search for all devices which can be connected via TCP,


Discovery.PORTTYPE_ALL (default)
Bluetooth or USB.

Discovery.PORTTYPE_TCP Search for devices connected to the network.

Search for devices which can be connected via Blue-


Discovery.PORTTYPE_BLUETOOTH
tooth.

Discovery.PORTTYPE_USB Search for devices which can be connected via USB.

❏ broadcast
Specify a Broadcast Address for TCP search as a string.

Value Description

"255.255.255.255" (default) -

❏ deviceModel
Specifies the device model to search for.

Value Description

Discovery.MODEL_ALL Search for all models.

329
Chapter 3 API Reference - Discovery class

❏ epsonFilter
Filters the search result by the Epson printers.

Value Description

Discovery.FILTER_NAME(default) Filters the search result by the Epson printers.

Discovery.FILTER_NONE Does not filter the search result.

❏ deviceType
Specifies the device type to search for.
The device type settings other than "Discovery.TYPE_ALL" can be used for the following systems con-
nected using Wi-Fi or Ethernet.
• Customer Display Models (SSL/TLS communication only)
• TM Printer + DM-D + barcode scanner model
• TM Printer + barcode scanner model
• POS Terminal Model

Value Description

Discovery.TYPE_ALL (default) Search for all devices.

Discovery.TYPE_PRINTER Search for printers.

Discovery.TYPE_HYBRID_PRINTER Searches for hybrid model printers.

Discovery.TYPE_DISPLAY Search for customer displays.

Discovery.TYPE_KEYBOARD Search for keyboards.

Discovery.TYPE_SCANNER Search for barcode scanners.

Discovery.TYPE_SERIAL Search for serial communication devices.

Discovery.TYPE_POS_KEYBOARD Search for the POS keyboard.

Discovery.TYPE_MSR Search for the MSR.

Discovery.TYPE_GFE Search for German fiscal element (TSE).

Discovery.TYPE_OTHER_PERIPHERAL Search for other peripheral devices.

❏ bondedDevices
Specifies the search target when searching for a device that can be connected via Bluetooth.

Value Description

Search for devices that can be connected, and devices


Discovery.TRUE
that were previously connected.

Discovery.FALSE (default) Search for devices that can be connected.

❏ usbDeviceName
Specifies whether to search USB devices by their names or not.

Value Description

Discovery.TRUE Search for USB compatible devices by their name.

330
Chapter 3 API Reference - Discovery class

Value Description

Does not search for USB compatible devices by their


Discovery.FALSE (default)
name.

listener
Specifies an object which has a notification target method.

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

• Tried to start search when search had been already


done.
ERR_ILLEGAL • Bluetooth is OFF.
• There is no permission for the position
information.

Memory necessary for processing could not be allo-


ERR_MEMORY
cated.

ERR_FAILURE An unknown error occurred.

ERR_PROCESSING Could not run the process.

Listener interface
public interface DiscoveryListener extends EventListener

Listener registration method


void onDiscovery(DeviceInfo deviceInfo);

Parameter
deviceInfo
The device information of the detected device is stored in the DeviceInfo type.
The following device information is stored.
❏ deviceType
The device type is stored.

Device type Status

For a printer Discovery.TYPE_PRINTER

For hybrid model printers Discovery.TYPE_HYBRID_PRINTER

For a customer display Discovery.TYPE_DISPLAY

For a keyboard Discovery.TYPE_KEYBOARD

331
Chapter 3 API Reference - Discovery class

Device type Status

For a barcode scanner Discovery.TYPE_SCANNER

For a serial communication device Discovery.TYPE_SERIAL

For POS keyboard Discovery.TYPE_POS_KEYBOARD

For MSR Discovery.TYPE_MSR

For German fiscal element (TSE) Discovery.TYPE_GFE

For other peripheral devices Discovery.TYPE_OTHER_PERIPHERAL

❏ target
The connection target of a device which can be specified by connectAPI is stored as a string.
Example)
"TCP:192.168.192.168"
"BT:00:22:15:7D:70:9C"
"USB:/dev/udev/*"
"USB:000000000000000000"
"TCP:192.168.192.168[local_printer]"
"TCP:192.168.192.168[local_display]"
"TCP:12:34:56:78:56:78"
❏ deviceName
The name set to the device is stored.
If it could not be acquired, "" (blank character) or "TM Printer" is stored.
Example)
For a printer: "TM-T88V"
❏ ipAddress
The IP address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: "192.168.192.168"
BT: ""(blank character)
❏ macAddress
The MAC address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: "12:34:56:78:56:78"
BT: ""(blank character)
❏ bdAddress
The BD address is stored.
If it could not be acquired, "" (blank character) is stored.
Example)
TCP: ""(blank character)
BT: "12:34:56:78:56:78"

332
Chapter 3 API Reference - Discovery class

Supplementary explanation
❏ The search result of this API is reported to the callback function for each device detected.
An already opened device is also reported. However, a USB device and a Bluetooth device are not
reported if they have been already opened.
❏ In search for TCP devices, if multiple devices with the same IP address exist, the device information is
treated as a single device. Consistency for such device information is not guaranteed.
❏ If the printer has its TCP address and TCPS address, and the both are detected, only the TCPS address is
reported to the callback function.
❏ Hybrid model printers can be detected as deviceType of Discovery.TYPE_PRINTER and Discov-
ery.TYPE_HYBRID_PRINTER.
❏ To search for a hybrid model printer connected via USB, specify Discovery.TYPE_ALL in deviceType.
❏ After the search begins and the process ends, make sure to end the search.
❏ This search function is not available in Android Studio simulator.
❏ When searching for a device running on Android 10 or later as a Bluetooth-capable device, enable access
to location information of the device.
❏ When searching for a device connected to the USB-A - Device Charging connector by using API Level 29
or higher application software, a dialogue box that tells you to acquire access permissions may pop up if
USB permission has not been acquired.
❏ If a USB device is connected while searching the device, the device may not be found.
In that case, terminate and restart the search.
❏ When searching for a Bluetooth-capable device, depending on API Level, the following permissions are
necessary.
API Level 28 or lower application software: ACCESS_COARSE_LOCATION
API Level 29 or higher application software: ACCESS_FINE_LOCATION

333
Chapter 3 API Reference - Discovery class

stop
Stops search.

Syntax
public static synchronized void stop() throws Epos2Exception
Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_ILLEGAL Tried to stop a search while it had not been started.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
After the search begins and the process ends, make sure to end the search.

334
Chapter 3 API Reference - Epos2Exception class

Epos2Exception class

getErrorStatus
Acquires the error status from the exception.

Syntax
public int getErrorStatus()
Return value
Error status defined by the API that generated the exception is returned.
Refer to Error Status and countermeasures.

335
Chapter 3 API Reference - Log class

Log class

setLogSettings
Sets the log output function.

Syntax
public static void setLogSettings(Context context, int period,
int output, String ipAddress, int port, int logSize, int logLevel)
throws Epos2Exception
Parameter
context
Specifies the application context.

period
Specifies whether the log output function setting is temporary or permanent.
The configuration file is not created for temporary setting but is created for permanent setting.

Value Description

PERIOD_TEMPORARY Temporarily reflects the setting.

PERIOD_PERMANENT Permanently reflects the setting.

output
Enables or disables the log output function and specifies the log output location.

Value Description

OUTPUT_DISABLE Disables the log output function.

OUTPUT_STORAGE Output to the storage of the terminal.

OUTPUT_TCP Output via TCP.

ipAddress
Specifies the IP address for TCP communication.
Specifies the IP address in the IPv4 format.
Null can be specified when the log output function is disabled or the log is output to the storage of the ter-
minal.

port
Specifies the port number for TCP communication.
Also specifies a value within the valid range even when the log output function is disabled or the log is out-
put to the storage of the terminal.

336
Chapter 3 API Reference - Log class

Value Description

Integer from 0 to 65535 Port number

logSize
Specifies the maximum capacity of the log stored in the storage.
Also specifies a value within the valid range even when the log output function is disabled or the log is out-
put to TCP.

Value Description

Integer from 1 to 50 Maximum capacity of the log stored (in MB)

logLevel
Specifies the log output level.

Value Description

LOGLEVEL_LOW Low level

Exception
When the process fails, Epos2Exception with one of the following error status occurs.

Error status Description

ERR_PARAM An invalid parameter was passed.

ERR_FAILURE An unknown error occurred.

Supplementary explanation
❏ To specify period for the PERIOD_PERMANENT, set the permissions for the application to access the stor-
age.
❏ To specify output for the OUTPUT_STORAGE, set the permissions for the application to access the stor-
age.
❏ To specify output for the OUTPUT_TCP, set the permissions for the application to access the network.

337
Chapter 3 API Reference - Log class

SdkVersion
Acquires the Epson ePOS SDK version.

Syntax
Getter
public static String getSdkVersion ()
Supplementary explanation
The version of SDK used can be acquired as a character string.
Example: "Ver.2.0.0"

338
Chapter 3 API Reference - EasySelect class

EasySelect class

parseNFC
Analyzes NFC tags data.

Syntax
public ArrayList<EasySelectInfo>parseNFC(Tag tag, int
timeout)
Parameter
tag
Specifies NFC tag data that has been read by using Android API.

timeout
Specifies a time period (in milliseconds) to wait for the NFC tag analysis to complete.

Value Description

Integer from 0 to 60000 Timeout for the parsing process (in milliseconds).

PARSE_NFC_TIMEOUT_DEFAULT Specifies the default value (500).

Return value
The NFC tag analysis result is returned to the member variables of the EasySelectInfo class. When the analy-
sis has failed, null is returned.

Supplementary explanation
❏ An NFC tag set to each TM printer includes the following information.

Type Description

Epson's unique data such as a product name and a


Slave printer (wired / wireless)
serial number.

Bluetooth compatible printer NFC standard data for Bluetooth (BTSSP).

❏ For a slave printer, the parseNFC API starts broadcast communication and sets a MAC address of the
slave printer. If no response is received from the printer until the timeout period has passed, null is
returned. Make sure to enable the slave printer to communicate via the network before executing pars-
eNFC.

339
Chapter 3 API Reference - EasySelect class

parseQR
Analyzes QR tags data.

Syntax
public EasySelectInfo parseQR(String data)
Parameter
data
Specifies QR code data that has been read by using Android API.

Return value
The QR code analysis result is returned to the member variables of the EasySelectInfo class.
When the analysis has failed, null is returned.

Supplementary explanation
Create the QR code using createQR API and print it to be read.
Some printers can print the QR code on a status sheet. For details, refer to the Technical Reference Guide of
the printer.

340
Chapter 3 API Reference - EasySelect class

createQR
Creates QR code data that can be analyzed by parseQR.

Syntax
public String createQR(String printerName, int deviceType,
String macAddress)
Parameter
printerName
Specifies a printer name.

deviceType
Specifies a printer type.

Value Description

Print.DEVTYPE_TCP Slave printer (wired / wireless)

Print.DEVTYPE_BLUETOOTH Bluetooth compatible printer

macAddress
Specifies a MAC address (for a slave printer), or a BD address (for a Bluetooth compatible printer). The follow-
ing shows the address format.

Format Description

00:11:22:33:44:55 Separate the digits by colons.

00-11-22-33-44-55 Separate the digits by hyphens.

001122334455 No separation

Return value
QR code print data is returned. Specify this data by addSymbol to print the QR code.
When creating the print data of QR code has failed, null is returned.

Supplementary explanation
To see the printer name, MAC address, and BD address, print a status sheet from the printer.
For instructions on how to print the status sheet, refer to the Technical Reference Guide of the printer.

341
Chapter 3 API Reference - EasySelectInfo class

EasySelectInfo class

deviceType
Stores printer type information.

Stored data Description


Print.DEVTYPE_TCP Slave printer

Print.DEVTYPE_BLUETOOTH Bluetooth compatible printer

Syntax
int deviceType

printerName
Stores printer name information.

Syntax
String printerName
Supplementary explanation
If the TM printer is equipped with a UB-R04 or UB-E04 interface board, printerName acquired from an NFC
tag will be returned as "" (blank).

macAddress
Stores a MAC address or a BD address.

Syntax
String macAddress

342
Chapter 3 API Reference - Status list

Status list

Error Status and countermeasures

Error Status Cause Countermeasure


An invalid parameter was passed.
<Example> Check the value specified in the param-
ERR_PARAM
A value outside the supported range eter.
was specified.

Run disconnect for the appropriate class


and then connect to restore communi-
cation.

Failed to communicate with the device. When a connection is established via


Bluetooth, the Android OS automatically
ERR_CONNECT <Example>
attempts a reconnection. If this error
Failed to connect to the printer.
status occurs even after 20 seconds or
more have elapsed, recover the commu-
nication according to the method
described above.

Check the timeout period.


Failed to communicate with the devices
ERR_TIMEOUT Set the timeout period to longer than
within the specified time.
the time required for printing.

Memory necessary for processing could


ERR_MEMORY Close unnecessary applications.
not be allocated.

The function was used in an illegal way.


<Example>
ERR_ILLEGAL Tried to start communication with a Use the API in the correct manner.
printer with which communication had
been already established.

Could not run the process.


<Example> The timing of the processes has over-
ERR_PROCESSING The specified process could not be run lapped. Re-execute the API in which the
because a similar process was being run error occurred.
by another thread.

• A model name or language not • A function cannot be used if it is not


supported was specified. supported by the specified model.
ERR_UNSUPPORTED
• A print method not supported by the • Specify a print method supported by
printer was specified. the printer.

The specified target could not be found.


<Example> Check if the connection type and/or IP
ERR_NOT_FOUND
The printer specified as the connection address are correct.
target does not exist.

343
Chapter 3 API Reference - Status list

Error Status Cause Countermeasure


The specified device is in use.
<Example> Stop using the device from another
ERR_IN_USE
The device is being used by another application.
application.

Check the class of the connected device


The device class is not correct (Printer,
and connect to it with the correct device
LineDisplay).
class.
ERR_TYPE_INVALID
Check the system configuration, and
An unsupported connection method is
specify the appropriate connection
specified.
method.

ERR_DISCONNECT Failed to disconnect from the device. Check connection with the device.

Finish communication with the commu-


ERR_ALREADY_OPENED Communication box is already open.
nication box.

ERR_ALREADY_USED Specified member ID is already in use. Specify a different member ID.

The number of created communication Delete an unnecessary communication


ERR_BOX_COUNT_OVER
boxes has exceeded the upper limit. box.

The number of members belong to the


Delete a member who is not using the
ERR_ BOX_CLIENT_OVER communication box has exceeded the
communication box.
upper limit.

Check for a problem with the execution


ERR_FAILURE An unknown error occurred.
environment.

ERR_RECOVERY_FAILURE Failed to recover the printer. Restart the printer.

344
Chapter 3 API Reference - Status list

Callback Code and countermeasures

CallbackCode Cause Countermeasure


CODE_SUCCESS Processed successfully. -

The process exceeded the specified tim-


CODE_ERR_TIMEOUT Adjust the timeout period.
eout period.

• The connection type and/or IP • Check if the connection type and/or


CODE_ERR_NOT_FOUND address are not correct. IP address are correct.
• The specified device is not connected. • Check connection with the device.

• Head overheat error occurred.


• Motor driver IC overheat error Start the process after the device is
occurred. cooled down.
CODE_ERR_AUTORECOVER
• Battery overheat error occurred.

The print reference mark on the label


Open and close the cover.
sheet cannot be found.

• Cover is open.
CODE_ERR_COVER_OPEN • Cover was opened during MICR read Close the printer cover.
operation.

Remove the error cause and power off


CODE_ERR_CUTTER Auto cutter error occurred.
and then on the printer.

Remove the error cause and power off


CODE_ERR_MECHANICAL Mechanical error occurred.
and then on the printer.

CODE_ERR_EMPTY Paper has run out. Refill the paper.

Power off and then on the printer.


CODE_ERR_UNRECOVERABLE Unrecoverable error occurred. Contact the distributor or service center
if the problem persists.

Turn off and then turn on the power


An error occurred with the TM-i firm-
CODE_ERR_SYSTEM supply to the TM-i series/TM-DT series,
ware or TM-DT software.
and restart the OS.

• Forced transmission was run in the • Run forced transmission in the offline
CODE_ERR_PORT online state. state.
• A communication error occurred. • Review the connection environment.

CODE_ERR_INVALID_WINDOW An unregistered window was specified. Check the specified window.

A print job ID which did not exist was


CODE_ERR_JOB_NOT_FOUND Check the specified job ID.
specified.

requestPrintJobStatus was run by speci-


Run the process after printing com-
CODE_PRINTING fying a print job ID which was being
pletes.
printed.

Print data exceeding the spooler capac- Check if communication with the
CODE_ERR_SPOOLER
ity was transmitted. printer is disconnected.

Replace the battery or connect the AC


CODE_ERR_BATTERY_LOW Battery has run out.
adapter.

345
Chapter 3 API Reference - Status list

CallbackCode Cause Countermeasure


Check for a problem with the execution
CODE_ERR_FAILURE An unknown error occurred.
environment.

The number of print jobs or data to be Wait for the printer to process some of
CODE_ERR_TOO_MANY_REQUESTS displayed on a display has exceeded the the tasks, then send the jobs or data
allowable limit of the printer's firmware. again.

Print job data with the size exceeding Check the content of the print job,
CODE_ERR_REQUEST_
the capacity of the printer firmware was reduce the size of the data, and then
ENTITY_TOO_LARGE
transmitted. resend the print job.

Check the slip sheet and clean the MICR


CODE_ERR_NO_MICR_DATA MICR data cannot be detected.
mechanism if necessary.

CODE_ERR_ILLEGAL_LENGTH Paper length is not appropriate. Check the paper length.

Magnetic waveform cannot be • Check the font to read.


CODE_ERR_NO_MAGNETIC_DATA
detected. • Clean the MICR mechanism.

CODE_ERR_RECOGNITION Illegible MICR text was detected. Check the status of the slip sheet.

Error occurred during MICR read opera- Remove the error cause and try again. If
CODE_ERR_READ
tion. the error persists, restart the printer.

Remove the error cause and try the


CODE_ERR_NOISE_DETECTED Noise error was detected. noise measurement again. If the error
persists, restart the printer.

Paper jam error occurred during MICR


CODE_ERR_PAPER_JAM Remove the jammed paper.
read operation.

• Paper was removed during insertion.


• Paper was removed during MICR read
CODE_ERR_PAPER_PULLED_OUT operation. Reset the paper.
• Paper was removed after it had been
inserted.

Failed to cancel waiting for paper inser- Check the status of the printer and try
CODE_ERR_CANCEL_FAILED
tion. the process again.

Pinter operation differs from the speci-


CODE_ERR_PAPER_TYPE Specify a correct print method again.
fied print method.

• Reset the paper and try the process


Could not run the process while waiting again.
CODE_ERR_WAIT_INSERTION
for paper insertion. • Cancel waiting for paper insertion
and try the process again.

The function was used in an illegal way.


<Example>
CODE_ERR_ILLEGAL Tried to cancel waiting for paper inser- Use the API in an appropriate manner.
tion while paper had already been
inserted.

Could not run the process while paper Eject the paper and try the process
CODE_ERR_INSERTED
had already been inserted. again.

Could not run the process while waiting Remove the paper and try the process
CODE_ERR_WAIT_REMOVAL
for paper removal. again.

346
Chapter 3 API Reference - Status list

CallbackCode Cause Countermeasure


Execute the process after the process
CODE_ERR_DEVICE_BUSY The specified device is in process.
completes.

CODE_ERR_RECOVERY_FAILURE Failed to recover the printer. Restart the printer.

Review the JSON format, and try send-


CODE_ERR_JSON_FORMAT Invalid JSON format.
ing the data again.

347
Chapter 3 API Reference - Status list

Printer Status and countermeasures

Printer class

Printer Status Cause Countermeasure


• The printer is powered off.
Check the power and communication
status.connection==Printer.FALSE • No connection is established with
status of the printer.
the printer.

Remove a cause which forces the


status.online==Printer.FALSE Offline status. printer offline (e.g., the cover is open
or paper has run out).

No connection is established with the Check the communication status of


status.online==Printer.UNKNOWN
printer. the printer.

status.coverOpen==Printer.TRUE Cover is open. Close the printer cover.

No connection is established with the Check the communication status of


status.coverOpen==Printer.UNKNOWN
printer. the printer.

status.paper==Printer.PAPER_NEAR_END Running short of paper. Replace the paper.

status.paper==Printer.PAPER_EMPTY Paper has run out. Refill the paper.

No connection is established with the Check the communication status of


status.paper==Printer.UNKNOWN
printer. the printer.

Paper is being fed by pressing the Run the process after paper feed com-
status.paperFeed==Printer.TRUE
Paper Feed button. pletes.

No connection is established with the Check the communication status of


status.paperFeed==Printer.UNKNOWN
printer. the printer.

Run the process after the operation


status.panelSwitch==Printer.SWITCH_ON Panel switch is being operated.
completes.

No connection is established with the Check the communication status of


status.panelSwitch==Printer.UNKNOWN
printer. the printer.

No connection is established with the Check the communication status of


status.drawer==Printer.UNKNOWN
printer. the printer.

status.errorStatus== Remove the error cause and power off


Mechanical error occurred.
Printer.MECHANICAL_ERR and then on the printer.

status.errorStatus== Remove the error cause and power off


Auto cutter error occurred.
Printer.AUTOCUTTER_ERR and then on the printer.

Power off and then on the printer.


status.errorStatus==
Unrecoverable error occurred. Contact the distributor or service cen-
Printer.UNRECOVER_ERR
ter if the problem persists.

348
Chapter 3 API Reference - Status list

Printer Status Cause Countermeasure


• Head overheat error occurred.
• Motor driver IC overheat error Start the process after the device is
status.errorStatus== occurred. cooled down.
Printer.AUTORECOVER_ERR • Battery overheat error occurred.

The print reference mark on the label


Open and close the cover.
sheet cannot be found.

No connection is established with the Check the communication status of


status.errorStatus==Printer.UNKNOWN
printer. the printer.

status.autoRecoverError== Run the process after the device gets


Head overheat error occurred.
Printer.HEAD_OVERHEAT cooled down.

status.autoRecoverError== Motor driver IC overheat error Run the process after the device gets
Printer.MOTOR_OVERHEAT occurred. cooled down.

status.autoRecoverError== Run the process after the device gets


Battery overheat error occurred.
Printer.BATTERY_OVERHEAT cooled down.

status.autoRecoverError== The print reference mark on the label


Open and close the cover.
Printer.WRONG_PAPER sheet cannot be found.

status.autoRecoverError==
Cover is open. Close the printer cover.
Printer.COVER_OPEN

status.autoRecoverError== No connection is established with the Check the communication status of


Printer.UNKNOWN printer. the printer.

Check the buzzer sounding condition


of the printer, and run the process
status.buzzer==Printer.TRUE Buzzer is sounding.
after removing the cause for buzzer
sounding.

No connection is established with the Check the communication status of


status.buzzer==Printer.UNKNOWN
printer. the printer.

No connection is established with the Check the communication status of


status.adapter==Printer.UNKNOWN
printer. the printer.

status.batteryLevel== Charge the battery or connect the AC


Running short of battery.
Printer.BATTERY_LEVEL_1 adapter.

status.batteryLevel== Replace the battery or connect the AC


Battery has run out.
Printer.BATTERY_LEVEL_0 adapter.

No connection is established with the Check the communication status of


status.batteryLevel==Printer.UNKNOWN
printer. the printer.

HybridPrinter class

Printer Status Cause Countermeasure


• The printer is powered off.
Check the power and communication
status.connection==HybridPrinter.FALSE • No connection is established with
status of the printer.
the printer.

349
Chapter 3 API Reference - Status list

Printer Status Cause Countermeasure


Remove a cause which forces the
status.online==HybridPrinter.FALSE Offline status. printer offline (e.g., the cover is open
or paper has run out).

No connection is established with the Check the communication status of


status.online==HybridPrinter.UNKNOWN
printer. the printer.

status.coverOpen==HybridPrinter.TRUE Cover is open. Close the printer cover.

status.coverOpen== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

status.paper==
Running short of paper. Replace the paper.
HybridPrinter.PAPER_NEAR_END

status.paper==
Paper has run out. Refill the paper.
HybridPrinter.PAPER_EMPTY

No connection is established with the Check the communication status of


status.paper==HybridPrinter.UNKNOWN
printer. the printer.

Paper is being fed by pressing the Run the process after paper feed com-
status.paperFeed==HybridPrinter.TRUE
Paper Feed button. pletes.

status.paperFeed== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

status.panelSwitch== Run the process after the operation


Panel switch is being operated.
HybridPrinter.SWITCH_ON completes.

status.panelSwitch== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

No connection is established with the Check the communication status of


status.drawer==HybridPrinter.UNKNOWN
printer. the printer.

status.errorStatus== Remove the error cause and power off


Mechanical error occurred.
HybridPrinter.MECHANICAL_ERR and then on the printer.

status.errorStatus== Remove the error cause and power off


Auto cutter error occurred.
HybridPrinter.AUTOCUTTER_ERR and then on the printer.

Power off and then on the printer.


status.errorStatus==
Unrecoverable error occurred. Contact the distributor or service cen-
HybridPrinter.UNRECOVER_ERR
ter if the problem persists.

• Head overheat error occurred.


status.errorStatus== Start the process after the device is
• Motor driver IC overheat error
HybridPrinter.AUTORECOVER_ERR cooled down.
occurred.

status.errorStatus== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

status.autoRecoverError== Run the process after the device gets


Head overheat error occurred.
HybridPrinter.HEAD_OVERHEAT cooled down.

status.autoRecoverError== Motor driver IC overheat error Run the process after the device gets
HybridPrinter.MOTOR_OVERHEAT occurred cooled down.

status.autoRecoverError== The print reference mark on the label


Open and close the cover.
HybridPrinter.WRONG_PAPER sheet cannot be found.

350
Chapter 3 API Reference - Status list

Printer Status Cause Countermeasure


status.autoRecoverError==
Cover is open. Close the printer cover.
HybridPrinter.COVER_OPEN

status.autoRecoverError== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

status.insertionWaiting==
Waiting for slip sheet insertion. Insert a slip sheet.
HybridPrinter.INSERTION_WAIT_SLIP

status.insertionWaiting==
HybridPrinter.INSERTION_WAIT_ Waiting for validation sheet insertion. Insert a validation sheet.
VALIDATION

status.insertionWaiting== Waiting for slip sheet insertion for


Insert a slip sheet.
HybridPrinter.INSERTION_WAIT_MICR MICR reading.

status.insertionWaiting== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

status.removalWaiting==
Waiting for paper removal. Remove the paper.
HybridPrinter.REMOVAL_WAIT_PAPER

status.removalWaiting== No connection is established with the Check the communication status of


HybridPrinter.UNKNOWN printer. the printer.

No connection is established with the Check the communication status of


status.slipPaper==EPOS2_UNKNOWN
printer. the printer.

351
Chapter 3 API Reference - Key code list

Key code list


Constant Code Constant Code
Keyboard.VK_BACK 0x08 Keyboard.VK_L 0x4C

Keyboard.VK_TAB 0x09 Keyboard.VK_M 0x4D

Keyboard.VK_RETURN 0x0D Keyboard.VK_N 0x4E

Keyboard.VK_SHIFT 0x10 Keyboard.VK_O 0x4F

Keyboard.VK_CONTROL 0x11 Keyboard.VK_P 0x50

Keyboard.VK_MENU 0x12 Keyboard.VK_Q 0x51

Keyboard.VK_CAPITAL 0x14 Keyboard.VK_R 0x52

Keyboard.VK_ESCAPE 0x1B Keyboard.VK_S 0x53

Keyboard.VK_CONVERT 0x1C Keyboard.VK_T 0x54

Keyboard.VK_NONCONVERT 0x1D Keyboard.VK_U 0x55

Keyboard.VK_SPACE 0x20 Keyboard.VK_V 0x56

Keyboard.VK_PRIOR 0x21 Keyboard.VK_W 0x57

Keyboard.VK_NEXT 0x22 Keyboard.VK_X 0x58

Keyboard.VK_END 0x23 Keyboard.VK_Y 0x59

Keyboard.VK_HOME 0x24 Keyboard.VK_Z 0x5A

Keyboard.VK_LEFT 0x25 Keyboard.VK_MULTIPLY 0x6A

Keyboard.VK_UP 0x26 Keyboard.VK_ADD 0x6B

Keyboard.VK_RIGHT 0x27 Keyboard.VK_SUBTRACT 0x6D

Keyboard.VK_DOWN 0x28 Keyboard.VK_F1 0x70

Keyboard.VK_INSERT 0x2D Keyboard.VK_F2 0x71

Keyboard.VK_DELETE 0x2E Keyboard.VK_F3 0x72

Keyboard.VK_0 0x30 Keyboard.VK_F4 0x73

Keyboard.VK_1 0x31 Keyboard.VK_F5 0x74

Keyboard.VK_2 0x32 Keyboard.VK_F6 0x75

Keyboard.VK_3 0x33 Keyboard.VK_F7 0x76

Keyboard.VK_4 0x34 Keyboard.VK_F8 0x77

Keyboard.VK_5 0x35 Keyboard.VK_F9 0x78

Keyboard.VK_6 0x36 Keyboard.VK_F10 0x79

Keyboard.VK_7 0x37 Keyboard.VK_F11 0x7A

Keyboard.VK_8 0x38 Keyboard.VK_F12 0x7B

Keyboard.VK_9 0x39 Keyboard.VK_OEM_1 0xBA

Keyboard.VK_A 0x41 Keyboard.VK_OEM_PLUS 0xBB

Keyboard.VK_B 0x42 Keyboard.VK_OEM_COMMA 0xBC

352
Chapter 3 API Reference - Key code list

Constant Code Constant Code


Keyboard.VK_C 0x43 Keyboard.VK_OEM_MINUS 0xBD

Keyboard.VK_D 0x44 Keyboard.VK_OEM_PERIOD 0xBE

Keyboard.VK_E 0x45 Keyboard.VK_OEM_2 0xBF

Keyboard.VK_F 0x46 Keyboard.VK_OEM_3 0xC0

Keyboard.VK_G 0x47 Keyboard.VK_OEM_4 0xDB

Keyboard.VK_H 0x48 Keyboard.VK_OEM_5 0xDC

Keyboard.VK_I 0x49 Keyboard.VK_OEM_6 0xDD

Keyboard.VK_J 0x4A Keyboard.VK_OEM_7 0xDE

Keyboard.VK_K 0x4B Keyboard.VK_OEM_ATTN 0xF0

353
Chapter 4 Device Specifications - List of Supported Classes

Device Specifications
Provides information about restriction on the use of APIs depend on devices such as printer and peripheral
device, and the parameter setting value.

Refer to the Technical Reference Guide of each printer for more information on each printer.

List of Supported Classes


The following lists the classes supported by each printer.

GermanyFiscalElement class

Common to all classes


BarcodeScanner class

OtherPeripheral class

Epos2Exception class
HybridPrinter class*1

EasySelectInfo class
POSKeyboard class
LineDisplay class*1

SimpleSerial class

EasySelect class*1
CommBox class

Discovery class
Keyboard class
Printer class*1

MSR class

Log class
TM-m10 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30 ✔ - ✔ - - ✔*3 - - ✔*7 - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30II ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30II-H ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30II-NT ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30II-S ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m30II-SL ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-m50 ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20II ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20III ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20IIIL ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20X ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T60 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T70 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T70II ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T81II ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T81III ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T82 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T82II ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

354
Chapter 4 Device Specifications - List of Supported Classes

GermanyFiscalElement class

Common to all classes


BarcodeScanner class

OtherPeripheral class

Epos2Exception class
HybridPrinter class*1

EasySelectInfo class
POSKeyboard class
LineDisplay class*1

SimpleSerial class

EasySelect class*1
CommBox class

Discovery class
Keyboard class
Printer class*1

MSR class

Log class
TM-T82III ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T82IIIL ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T82X ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T83II ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T83III ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T88V ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T88VI ✔ - ✔ - - ✔*4 - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T88VII ✔ - ✔ - - ✔ - - ✔ - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T100 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-L90 Liner-Free
✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔
Label Printer Model

TM-U220 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-U330 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

EU-m30 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P20 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P60 (Receipt) ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P60 (Peeler) ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P60II (Receipt) ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P60II (Peeler) ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-P80 ✔ - - - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-H6000V ✔ ✔*5 ✔ - - - - - - - - ✔ ✔ ✔ ✔ ✔ ✔

TM-T20II-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T70-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T82II-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T83II-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T88V-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T88VI-iHUB ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ ✔*7 - ✔ ✔ ✔ ✔ ✔ - -

TM-U220-i ✔ - ✔ ✔ - ✔*6 ✔*6 ✔ - - ✔ ✔ ✔ ✔ ✔ - -

TM-T70II-DT ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - -

355
Chapter 4 Device Specifications - List of Supported Classes

GermanyFiscalElement class

Common to all classes


BarcodeScanner class

OtherPeripheral class

Epos2Exception class
HybridPrinter class*1

EasySelectInfo class
POSKeyboard class
LineDisplay class*1

SimpleSerial class

EasySelect class*1
CommBox class

Discovery class
Keyboard class
Printer class*1

MSR class

Log class
TM-T70II-DT2 ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - -

TM-T88V-DT ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - -

TM-T88VI-DT2 ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - -

TM-H6000IV-DT ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔ ✔ - -

TM-T88IV*2 ✔ - - - - - - - - - - - - - - - -

TM-T90*2 ✔ - - - - - - - - - - - - - - - -
*2
TM-L90 ✔ - - - - - - - - - - - - - - - -

TM-H6000IV*2 ✔ - - - - - - - - - - - - - - - -

*1: The availability and restriction on the use of APIs varies for each printer. Refer to List of Supported APIs.
*2: Supports control as a slave printer only.
*3: Supported by TM-m30 firmware Ver. 1.40 ESC/POS or later.
*4: Supported by TM-T88VI firmware Ver. 40.50 ESC/POS or later.
*5: The availability and restriction on the use of APIs varies for each model. Refer to HybridPrinter class.
*6: Does not support control by the device control program.
*7: Supported with the following versions of firmware.
• TM-m30 firmware Ver. 1.46A ESC/POS or later
• TM-m30 firmware Ver. 1.46B ESC/POS or later
• TM-T88VI-iHUB firmware Ver. 50.52A ESC/POS or later
• TM-T88VI-iHUB firmware Ver. 50.52B ESC/POS or later

356
Chapter 4 Device Specifications - List of Supported APIs

List of Supported APIs


Provides list of supported APIs for each printer.
The following is an explanation of the symbol indicated in table:
• ✔: Supported.
• ✔*: Supported but has a restriction on specifying the parameter setting value.
• -: Not supported.
For information on the "✔*" restrictions, refer to Printer-specific Support Information.

Printer class

Single-function models (1)


TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

Printer ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

beginTransaction ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

endTransaction ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

requestPrintJobStatus - - - - - - - - - - - - - - -

clearCommandBuffer ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextAlign ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addLineSpace ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextRotate ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextLang ✔* ✔* ✔ ✔ ✔ ✔ ✔ ✔ ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addTextFont ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addTextSmooth ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextSize ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextStyle ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHPosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

357
Chapter 4 Device Specifications - List of Supported APIs

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

addFeedLine ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addImage ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addLogo ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addBarcode ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addSymbol ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHLine - - - - - - - - - - - - - - -

addVLineBegin - - - - - - - - - - - - - - -

addVLineEnd - - - - - - - - - - - - - - -

addPageBegin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageEnd ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageArea ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageDirection ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPagePosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageLine ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* - - - - - - -

addPageRectangle ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* - - - - - - -

addRotateBegin - - ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addRotateEnd - - ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addCut ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addPulse ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSound ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* - -

addFeedPosition - - - - - - - - - - - - - - -

addLayout - - - - - - - - - - - - - - -

addCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getMaintenanceCounter - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ - - - -

resetMaintenanceCounter - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ - - - -

getPrinterSetting - ✔* ✔* ✔* ✔* ✔* ✔* ✔* - ✔* ✔* - - - -

setPrinterSetting - ✔* ✔* ✔* ✔* ✔* ✔* ✔* - ✔* ✔* - - - -

getPrinterSettingEx - - ✔ ✔ - - - - - - - - - - -

setPrinterSettingEx - - ✔ ✔ - - - - - - - - - - -

getPrinterInformation - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

downloadFirmwareList ✔* ✔* ✔* ✔* ✔* ✔* - - - - - - - - -

getPrinterFirmwareInfo ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - - - -

verifyUpdate ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - - - -

358
Chapter 4 Device Specifications - List of Supported APIs

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

updateFirmware ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - - - -

forceRecover - - - - - - - - - - - - - - -

forcePulse - - - - - - - - - - - - - - -

forceStopSound - - - - - - - - - - - - - - -

forceCommand - - - - - - - - - - - - - - -

forceReset - - - - - - - - - - - - - - -

setStatusChangeEventLis-
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
tener

setReceiveEventListener ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setGetPrinterSettingExLis-
- - ✔ ✔ - - - - - - - - - - -
tener

setSetPrinterSettingExLis-
- - ✔ ✔ - - - - - - - - - - -
tener

interval ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Single-function models (2)

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82

API

Printer ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

beginTransaction - - - - - - - - - - - ✔ ✔ - -

endTransaction - - - - - - - - - - - ✔ ✔ - -

359
Chapter 4 Device Specifications - List of Supported APIs

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82
API

requestPrintJobStatus - - - - - - - - - - - - - - -

clearCommandBuffer ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextAlign ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addLineSpace ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextRotate ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextLang ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔ ✔* ✔*

addTextFont ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addTextSmooth ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextSize ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextStyle ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHPosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedLine ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addImage ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addLogo ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addBarcode ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addSymbol ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHLine - - - - - - - - - - - - - - -

addVLineBegin - - - - - - - - - - - - - - -

addVLineEnd - - - - - - - - - - - - - - -

addPageBegin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageEnd ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageArea ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageDirection ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPagePosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageLine - - - - - - - - - - - ✔* ✔* - -

360
Chapter 4 Device Specifications - List of Supported APIs

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82
API

addPageRectangle - - - - - - - - - - - ✔* ✔* - -

addRotateBegin - - - - - - - - - - - - ✔ - -

addRotateEnd - - - - - - - - - - - - ✔ - -

addCut ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addPulse ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSound ✔* - ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addFeedPosition - - - - - - - - - - - - - - ✔

addLayout - - - - - - - - - - - - - - -

addCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getMaintenanceCounter - - - - - - - - - - - ✔ ✔ - -

resetMaintenanceCounter - - - - - - - - - - - ✔ ✔ - -

getPrinterSetting - - - - - - - - - - - ✔* ✔ - -

setPrinterSetting - - - - - - - - - - - ✔* ✔* - -

getPrinterSettingEx - - - - - - - - - - - - - - -

setPrinterSettingEx - - - - - - - - - - - - - - -

getPrinterInformation - - - - - - - - - - - - - - -

downloadFirmwareList - - - - - - - - - - - ✔* - - -

getPrinterFirmwareInfo - - - - - - - - - - - ✔ - - -

verifyUpdate - - - - - - - - - - - ✔ - - -

updateFirmware - - - - - - - - - - - ✔ - - -

forceRecover - - - - - - - - - - - - - - -

forcePulse - - - - - - - - - - - - - - -

forceStopSound - - - - - - - - - - - - - - -

forceCommand - - - - - - - - - - - - - - -

forceReset - - - - - - - - - - - - - - -

setStatusChangeEventLis-
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
tener

361
Chapter 4 Device Specifications - List of Supported APIs

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82
API

setReceiveEventListener ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setGetPrinterSettingExLis-
- - - - - - - - - - - - - - -
tener

setSetPrinterSettingExLis-
- - - - - - - - - - - - - - -
tener

interval ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Single-function models (3)/Mobile models/Hybrid models


TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80

API

Printer ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

beginTransaction - - ✔ - - - - - - ✔

endTransaction - - ✔ - - - - - - ✔

requestPrintJobStatus - - - - - - - - - -

clearCommandBuffer ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextAlign ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addLineSpace ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextRotate ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextLang ✔* ✔* ✔ ✔* ✔* ✔* ✔* ✔* ✔* ✔*

362
Chapter 4 Device Specifications - List of Supported APIs

TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80
API

addTextFont ✔* ✔* ✔* ✔ ✔* ✔* ✔* ✔* ✔* ✔*

addTextSmooth ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextSize ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextStyle ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHPosition - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedLine ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addImage ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addLogo ✔* ✔* ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addBarcode - ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addSymbol - ✔* ✔* ✔* - ✔* ✔* ✔* ✔* ✔*

addHLine - - - - - - - - - -

addVLineBegin - - - - - - - - - -

addVLineEnd - - - - - - - - - -

addPageBegin - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageEnd - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageArea - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageDirection - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPagePosition - - ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addPageLine - - ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addPageRectangle - - ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addRotateBegin - - ✔ - - - - - - -

addRotateEnd - - ✔ - - - - - - -

addCut ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addPulse ✔ ✔ - - - - - - - ✔

addSound - - - ✔* - - ✔* ✔* ✔* -

addFeedPosition - ✔* - ✔* - ✔ - ✔ ✔* -

addLayout - - - ✔* - ✔ - ✔ ✔* -

addCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getMaintenanceCounter - - ✔ ✔* - - - - - -

resetMaintenanceCounter - - ✔ ✔* - - - - - -

363
Chapter 4 Device Specifications - List of Supported APIs

TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80
API

getPrinterSetting - - ✔* ✔* - - - - - -

setPrinterSetting - - ✔* ✔* - - - - - -

getPrinterSettingEx - - ✔ - - - - - - -

setPrinterSettingEx - - ✔ - - - - - - -

getPrinterInformation - - ✔ - - - - - - -

downloadFirmwareList - - - - - - - - - -

getPrinterFirmwareInfo - - - - - - - - - -

verifyUpdate - - - - - - - - - -

updateFirmware - - - - - - - - - -

forceRecover - - - - - - - - - ✔

forcePulse - - - - - - - - - ✔

forceStopSound - - - - - - - - - -

forceCommand - - - - - - - - - ✔

forceReset - - - - - - - - - ✔

setStatusChangeEventLis-
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
tener

setReceiveEventListener ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setGetPrinterSettingExLis-
- - ✔ - - - - - - -
tener

setSetPrinterSettingExLis-
- - ✔ - - - - - - -
tener

interval ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

TM-i Series/TM-DT Series


TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i

API

Printer ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

364
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i
API

getStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

beginTransaction - - - - - - - - - - - -

endTransaction - - - - - - - - - - - -

requestPrintJobStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

clearCommandBuffer ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextAlign ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addLineSpace ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextRotate ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextLang ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addTextFont ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addTextSmooth ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addTextSize ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addTextStyle ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addHPosition ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addFeedLine ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addImage ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addLogo ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addBarcode ✔* ✔* ✔* ✔* ✔* ✔* - ✔* ✔* ✔* ✔* ✔*

addSymbol ✔* ✔* ✔* ✔* ✔* ✔* - ✔* ✔* ✔* ✔* ✔*

addHLine - - - - - - - - - - - -

addVLineBegin - - - - - - - - - - - -

addVLineEnd - - - - - - - - - - - -

addPageBegin ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addPageEnd ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addPageArea ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addPageDirection ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addPagePosition ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

addPageLine - - - - - ✔* - - - - - -

addPageRectangle - - - - - ✔* - - - - - -

365
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i
API

addRotateBegin - - - - - - - - - - - -

addRotateEnd - - - - - - - - - - - -

addCut ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addPulse ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSound ✔* - ✔* ✔* ✔* ✔* - ✔* ✔* ✔* ✔* -

addFeedPosition - - - - - - - - - - - -

addLayout - - - - - - - - - - - -

addCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getMaintenanceCounter - - - - - ✔ - - - - - -

resetMaintenanceCounter - - - - - ✔ - - - - - -

getPrinterSetting - - - - - ✔* - - - - - -

setPrinterSetting - - - - - ✔* - - - - - -

getPrinterSettingEx - - - - - - - - - - - -

setPrinterSettingEx - - - - - - - - - - - -

getPrinterInformation - - - - - ✔ - - - - - -

downloadFirmwareList - - - - - ✔* - - - - - -

getPrinterFirmwareInfo - - - - - ✔ - - - - - -

verifyUpdate - - - - - ✔ - - - - - -

updateFirmware - - - - - ✔ - - - - - -

forceRecover ✔ ✔ ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ ✔

forcePulse ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

forceStopSound ✔ - ✔ ✔ ✔ ✔ - ✔ ✔ ✔ ✔ -

forceCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

forceReset ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setStatusChangeEventLis-
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
tener

setReceiveEventListener ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setGetPrinterSettingExLis-
- - - - - - - - - - - -
tener

setSetPrinterSettingExLis-
- - - - - - - - - - - -
tener

interval ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

366
Chapter 4 Device Specifications - List of Supported APIs

Slave Printers

TM-H6000IV
TM-T88IV

TM-L90
TM-T90
API

Printer ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔

startMonitor ✔ ✔ ✔ ✔

stopMonitor ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔

beginTransaction - - - -

endTransaction - - - -

requestPrintJobStatus - - - -

clearCommandBuffer ✔ ✔ ✔ ✔

addTextAlign ✔ ✔ ✔ ✔

addLineSpace ✔ ✔ ✔ ✔

addTextRotate ✔ ✔ ✔ ✔

addText ✔ ✔ ✔ ✔

addTextLang ✔* ✔* ✔* ✔*

addTextFont ✔* ✔* ✔* ✔*

addTextSmooth ✔ ✔ ✔ ✔

addTextSize ✔ ✔ ✔ ✔

addTextStyle ✔* ✔* ✔* ✔*

addHPosition ✔ ✔ ✔ ✔

addFeedUnit ✔ ✔ ✔ ✔

addFeedLine ✔ ✔ ✔ ✔

addImage ✔* ✔* ✔* ✔*

addLogo ✔ ✔ ✔ ✔

addBarcode ✔* ✔* ✔* ✔*

addSymbol ✔* ✔* ✔* ✔*

addHLine - - - -

addVLineBegin - - - -

addVLineEnd - - - -

addPageBegin ✔ ✔ ✔ ✔

addPageEnd ✔ ✔ ✔ ✔

367
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV
TM-T88IV

TM-L90
TM-T90
API

addPageArea ✔ ✔ ✔ ✔

addPageDirection ✔ ✔ ✔ ✔

addPagePosition ✔ ✔ ✔ ✔

addPageLine - - - -

addPageRectangle - - - -

addRotateBegin - - - -

addRotateEnd - - - -

addCut ✔* ✔* ✔* ✔*

addPulse ✔ ✔ ✔ ✔

addSound - - - -

addFeedPosition - - ✔ -

addLayout - - - -

addCommand ✔ ✔ ✔ ✔

getMaintenanceCounter - - - -

resetMaintenanceCounter - - - -

getPrinterSetting - - - -

setPrinterSetting - - - -

getPrinterSettingEx - - - -

setPrinterSettingEx - - - -

getPrinterInformation - - - -

downloadFirmwareList - - - -

getPrinterFirmwareInfo - - - -

verifyUpdate - - - -

updateFirmware - - - -

forceRecover - - - -

forcePulse - - - -

forceStopSound - - - -

forceCommand - - - -

forceReset - - - -

setStatusChangeEventLis-
✔ ✔ ✔ ✔
tener

setReceiveEventListener ✔ ✔ ✔ ✔

368
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV
TM-T88IV

TM-L90
TM-T90
API

setGetPrinterSettingExLis-
- - - -
tener

setSetPrinterSettingExLis-
- - - -
tener

interval ✔ ✔ ✔ ✔

369
Chapter 4 Device Specifications - List of Supported APIs

LineDisplay class

Single-function models (1)

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

LineDisplay - ✔* ✔* ✔* ✔* ✔* ✔* ✔* - - - - - - -

connect - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

disconnect - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

getStatus - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

sendData - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

clearCommandBuffer - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addInitialize - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addCreateWindow - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addDestroyWindow - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addSetCurrentWindow - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addClearCurrentWindow - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addCreateScreen - - - ✔ ✔ ✔ ✔ - - - - - - - -

addCreateScreenCustom - - - ✔ ✔ ✔ ✔ - - - - - - - -

addCreateTextArea - - - ✔ ✔ ✔ ✔ - - - - - - - -

addDestroyTextArea - - - ✔ ✔ ✔ ✔ - - - - - - - -

addSetCurrentTextArea - - - ✔ ✔ ✔ ✔ - - - - - - - -

addClearCurrentTextArea - - - ✔ ✔ ✔ ✔ - - - - - - - -

addSetCursorPosition - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addMoveCursorPosition - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addSetCursorType - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addText - ✔* ✔* ✔ ✔ ✔ ✔ ✔* - - - - - - -

addReverseText - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addMarqueeText - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addSetBlink - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addSetBrightness - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

addBackgroundColor - - - ✔ ✔ ✔ ✔ - - - - - - - -

addStartSlideShow - - - ✔ ✔ ✔ ✔ - - - - - - - -

addStopSlideShow - - - ✔ ✔ ✔ ✔ - - - - - - - -

addDownloadImage - - - ✔ ✔ ✔ ✔ - - - - - - - -

370
Chapter 4 Device Specifications - List of Supported APIs

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

addRegisterDownloadIm-
- - - ✔ ✔ ✔ ✔ - - - - - - - -
age

addNVImage - - - ✔ ✔ ✔ ✔ - - - - - - - -

addClearImage - - - ✔ ✔ ✔ ✔ - - - - - - - -

addSymbol - - - ✔ ✔ ✔ ✔ - - - - - - - -

addClearSymbol - - - ✔ ✔ ✔ ✔ - - - - - - - -

addShowClock - - - - - - - - - - - - - - -

addCommand - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

setReceiveEventListener - ✔ ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -

Single-function models (2)

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III
TM-T82X

TM-T88V
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82

API

LineDisplay - - - - - - - - - - - ✔* ✔* - -

connect - - - - - - - - - - - ✔ ✔ - -

disconnect - - - - - - - - - - - ✔ ✔ - -

getStatus - - - - - - - - - - - ✔ ✔ - -

sendData - - - - - - - - - - - ✔ ✔ - -

clearCommandBuffer - - - - - - - - - - - ✔ ✔ - -

addInitialize - - - - - - - - - - - ✔ ✔ - -

addCreateWindow - - - - - - - - - - - ✔ ✔ - -

addDestroyWindow - - - - - - - - - - - ✔ ✔ - -

addSetCurrentWindow - - - - - - - - - - - ✔ ✔ - -

addClearCurrentWindow - - - - - - - - - - - ✔ ✔ - -

addCreateScreen - - - - - - - - - - - - ✔ - -

addCreateScreenCustom - - - - - - - - - - - - ✔ - -

371
Chapter 4 Device Specifications - List of Supported APIs

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82
API

addCreateTextArea - - - - - - - - - - - - ✔ - -

addDestroyTextArea - - - - - - - - - - - - ✔ - -

addSetCurrentTextArea - - - - - - - - - - - - ✔ - -

addClearCurrentTextArea - - - - - - - - - - - - ✔ - -

addSetCursorPosition - - - - - - - - - - - ✔ ✔ - -

addMoveCursorPosition - - - - - - - - - - - ✔ ✔ - -

addSetCursorType - - - - - - - - - - - ✔ ✔ - -

addText - - - - - - - - - - - ✔* ✔ - -

addReverseText - - - - - - - - - - - ✔ ✔ - -

addMarqueeText - - - - - - - - - - - ✔ ✔ - -

addSetBlink - - - - - - - - - - - ✔ ✔ - -

addSetBrightness - - - - - - - - - - - ✔ ✔ - -

addBackgroundColor - - - - - - - - - - - - ✔ - -

addStartSlideShow - - - - - - - - - - - - ✔ - -

addStopSlideShow - - - - - - - - - - - - ✔ - -

addDownloadImage - - - - - - - - - - - - ✔ - -

addRegisterDownloadIm-
- - - - - - - - - - - - ✔ - -
age

addNVImage - - - - - - - - - - - - ✔ - -

addClearImage - - - - - - - - - - - - ✔ - -

addSymbol - - - - - - - - - - - - ✔ - -

addClearSymbol - - - - - - - - - - - - ✔ - -

addShowClock - - - - - - - - - - - ✔ ✔ - -

addCommand - - - - - - - - - - - ✔ ✔ - -

setReceiveEventListener - - - - - - - - - - - ✔ ✔ - -

372
Chapter 4 Device Specifications - List of Supported APIs

Single-function models (3)/Mobile models/Hybrid models

TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80
API

LineDisplay - - - - - - - - - ✔*

connect - - - - - - - - - ✔

disconnect - - - - - - - - - ✔

getStatus - - - - - - - - - ✔

sendData - - - - - - - - - ✔

clearCommandBuffer - - - - - - - - - ✔

addInitialize - - - - - - - - - ✔

addCreateWindow - - - - - - - - - ✔

addDestroyWindow - - - - - - - - - ✔

addSetCurrentWindow - - - - - - - - - ✔

addClearCurrentWindow - - - - - - - - - ✔

addCreateScreen - - - - - - - - - -

addCreateScreenCustom - - - - - - - - - -

addCreateTextArea - - - - - - - - - -

addDestroyTextArea - - - - - - - - - -

addSetCurrentTextArea - - - - - - - - - -

addClearCurrentTextArea - - - - - - - - - -

addSetCursorPosition - - - - - - - - - ✔

addMoveCursorPosition - - - - - - - - - ✔

addSetCursorType - - - - - - - - - ✔

addText - - - - - - - - - ✔*

addReverseText - - - - - - - - - ✔

addMarqueeText - - - - - - - - - ✔

addSetBlink - - - - - - - - - ✔

addSetBrightness - - - - - - - - - ✔

addBackgroundColor - - - - - - - - - -

addStartSlideShow - - - - - - - - - -

addStopSlideShow - - - - - - - - - -

addDownloadImage - - - - - - - - - -

addRegisterDownloadIm-
- - - - - - - - - -
age

373
Chapter 4 Device Specifications - List of Supported APIs

TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80
API

addNVImage - - - - - - - - - -

addClearImage - - - - - - - - - -

addSymbol - - - - - - - - - -

addClearSymbol - - - - - - - - - -

addShowClock - - - - - - - - - ✔

addCommand - - - - - - - - - ✔

setReceiveEventListener - - - - - - - - - ✔

TM-i Series/TM-DT Series

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i

API

LineDisplay ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

connect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

disconnect ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getStatus ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

sendData ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

clearCommandBuffer ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addInitialize ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addCreateWindow ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addDestroyWindow ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSetCurrentWindow ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addClearCurrentWindow ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addCreateScreen - - - - - - - - ✔ - ✔ -

addCreateScreenCustom - - - - - - - - ✔ - ✔ -

addCreateTextArea - - - - - - - - ✔ - ✔ -

addDestroyTextArea - - - - - - - - ✔ - ✔ -

addSetCurrentTextArea - - - - - - - - ✔ - ✔ -

addClearCurrentTextArea - - - - - - - - ✔ - ✔ -

addSetCursorPosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addMoveCursorPosition ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

374
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i
API

addSetCursorType ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addText ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔* ✔*

addReverseText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addMarqueeText ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSetBlink ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addSetBrightness ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addBackgroundColor - - - - - - - - ✔ - ✔ -

addStartSlideShow - - - - - - - - ✔ - ✔ -

addStopSlideShow - - - - - - - - ✔ - ✔ -

addDownloadImage - - - - - - - - ✔ - ✔ -

addRegisterDownloadIm-
- - - - - - - - ✔ - ✔ -
age

addNVImage - - - - - - - - ✔ - ✔ -

addClearImage - - - - - - - - ✔ - ✔ -

addSymbol - - - - - - - - ✔ - ✔ -

addClearSymbol - - - - - - - - ✔ - ✔ -

addShowClock ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

addCommand ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setReceiveEventListener ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Slave Printers
TM-H6000IV
TM-T88IV

TM-L90
TM-T90

API

LineDisplay - - - -

connect - - - -

disconnect - - - -

getStatus - - - -

sendData - - - -

clearCommandBuffer - - - -

addInitialize - - - -

addCreateWindow - - - -

addDestroyWindow - - - -

375
Chapter 4 Device Specifications - List of Supported APIs

TM-H6000IV
TM-T88IV

TM-L90
TM-T90
API

addSetCurrentWindow - - - -

addClearCurrentWindow - - - -

addCreateScreen - - - -

addCreateScreenCustom - - - -

addCreateTextArea - - - -

addDestroyTextArea - - - -

addSetCurrentTextArea - - - -

addClearCurrentTextArea - - - -

addSetCursorPosition - - - -

addMoveCursorPosition - - - -

addSetCursorType - - - -

addText - - - -

addReverseText - - - -

addMarqueeText - - - -

addSetBlink - - - -

addSetBrightness - - - -

addBackgroundColor - - - -

addStartSlideShow - - - -

addStopSlideShow - - - -

addDownloadImage - - - -

addRegisterDownloadIm-
- - - -
age

addNVImage - - - -

addClearImage - - - -

addSymbol - - - -

addClearSymbol - - - -

addShowClock - - - -

addCommand - - - -

setReceiveEventListener - - - -

376
Chapter 4 Device Specifications - List of Supported APIs

Common to all classes

Single-function models (1)

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

getAdmin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getLocation ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setConnectionEventLis-
- - ✔ ✔ ✔ ✔ ✔ ✔ - - - - - - -
tener

Single-function models (2)

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III

TM-T88V
TM-T82X
TM-T70II

TM-T81II

TM-T82II

TM-T83II

TM-T100
TM-T82

API

getAdmin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getLocation ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setConnectionEventLis-
- - - - - - - - - - - - - - -
tener

Single-function models (3)/Mobile models/Hybrid models


TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80

API

getAdmin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getLocation ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setConnectionEventLis-
- - ✔ - - - - - - ✔
tener

377
Chapter 4 Device Specifications - List of Supported APIs

TM-i Series/TM-DT Series

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i
API

getAdmin ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

getLocation ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

setConnectionEventLis-
✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔
tener

Slave Printers
TM-H6000IV
TM-T88IV

TM-L90
TM-T90

API

getAdmin - - - -

getLocation - - - -

setConnectionEventLis-
- - - -
tener

378
Chapter 4 Device Specifications - List of Supported APIs

EasySelect class

Single-function models (1)

TM-m30II-NT

TM-m30II-SL
TM-m30II-H

TM-m30II-S

TM-T20IIIL
TM-m30II

TM-T20III

TM-T20X
TM-T20II
TM-m10

TM-m30

TM-m50

TM-T20

TM-T60

TM-T70
API

parseNFC ✔ ✔ ✔ ✔ ✔ - - ✔ - - - - - - -

parseQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

createQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Single-function models (2)

TM-L90 Liner-Free Label Printer Model


TM-T82IIIL

TM-T88VII
TM-T88VI
TM-T81III

TM-T82III

TM-T83III
TM-T82X

TM-T88V

TM-T100
TM-T70II

TM-T81II

TM-T82II

TM-T83II
TM-T82

API

parseNFC - - - - - - - - - - - ✔ ✔ - -

parseQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

createQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

Single-function models (3)/Mobile models/Hybrid models


TM-P60II (Receipt)
TM-P60 (Receipt)

TM-P60II (Peeler)
TM-P60 (Peeler)

TM-H6000V
TM-U220

TM-U330

EU-m30

TM-P20

TM-P80

API

parseNFC - - - ✔ ✔ ✔ ✔ ✔ ✔ ✔

parseQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

createQR ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔ ✔

379
Chapter 4 Device Specifications - List of Supported APIs

TM-i Series/TM-DT Series

TM-H6000IV-DT
TM-T88VI-iHUB

TM-T88VI-DT2
TM-T70II-DT2

TM-T88V-DT
TM-T70II-DT
TM-U220-i
TM-T88V-i
TM-T20II-i

TM-T82II-i

TM-T83II-i
TM-T70-i
API

parseNFC - - - - - ✔ - - - - - -

parseQR - - - - - - - - - - - -

createQR - - - - - - - - - - - -

Slave Printers
TM-H6000IV
TM-T88IV

TM-L90
TM-T90

API

parseNFC - - - -

parseQR - - - -

createQR - - - -

380
Chapter 4 Device Specifications - Printer-specific Support Information

Printer-specific Support Information

TM-m10

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 420 x 2400 dots

Maximum page mode area 420 x 2400 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M10

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

381
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

382
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode • Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

383
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

384
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

printerModel • TM-m10

• -A
downloadFirmwareList option
• -B

listener -

385
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 2400 dots 576 x 2400 dots

Maximum page mode area 420 x 2400 dots 576 x 2400 dots

Baseline of Font A 21 dots from the top of the character

ANK 21 dots from the top of the character

Baseline of Font B Chinese characters 21 dots from the top of the character

Hangul character 15 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

386
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

387
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode • Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

388
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

389
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

390
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100

setPrinterSetting • Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
value • Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10

listener -

printerModel • TM-m30

• -A
downloadFirmwareList option
• -B

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

391
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

392
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30II

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30II

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN
Printer lang
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

393
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

394
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

395
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

396
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

397
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
setPrinterSetting • Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
value
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

printerModel • TM-m30II

• -A
downloadFirmwareList option
• -B

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

398
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang • LineDisplay.LANG_MULTI
• LineDisplay.PARAM_DEFAULT
addText
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

399
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30II-H

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30II

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN
Printer lang
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

400
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

401
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

402
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

403
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

404
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
setPrinterSetting • Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

printerModel • TM-m30II-H

• -A
downloadFirmwareList option
• -B

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

405
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30II-NT

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30II

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN
Printer lang
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

406
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

407
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

408
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

409
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

410
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
setPrinterSetting • Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

printerModel • TM-m30II-NT

• -A
downloadFirmwareList option
• -B

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

411
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30II-S

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30II

Printer lang • Printer.MODEL_ANK

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

412
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

413
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

414
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

415
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

416
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
setPrinterSetting • Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

printerModel • TM-m30II-S

• -A
downloadFirmwareList option
• -B

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

417
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m30II-SL

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M30II

Printer lang • Printer.MODEL_ANK

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

418
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

419
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

420
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

421
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

422
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
setPrinterSetting • Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

423
Chapter 4 Device Specifications - Printer-specific Support Information

TM-m50

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 4800 dots 512 x 4800 dots

Maximum page mode area 360 x 4800 dots 512 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_M50

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN
Printer lang
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

424
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

425
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
addBarcode • Printer.BARCODE_GS1_DATABAR_LIMITED
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

426
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

427
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

428
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
setPrinterSetting • Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

• LineDisplay.DM_D30
displaySeries
LineDisplay • LineDisplay.DM_D70

context -

429
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang • LineDisplay.LANG_MULTI
• LineDisplay.PARAM_DEFAULT
addText
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

430
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

431
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

432
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

433
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

434
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20II

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

435
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

436
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

437
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

438
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PrintDensity
type
• Printer.Setting.PrintSpeed

• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115

setPrinterSetting • Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
value
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

439
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20III

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Standerd mode 420 x 1662 dots 576 x 1662 dots


Initial page mode area
42 column mode 378 x 1662 dots 546 x 1662 dots

Standerd mode 464 x 3324 dots 639 x 3324 dots


Maximum page mode area
42 column mode 639 x 3324 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

440
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

441
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

442
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

443
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

• Integer from 5000 to 600000


timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PrintDensity
type
• Printer.Setting.PrintSpeed

• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115

setPrinterSetting • Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
value
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

444
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20IIIL

Printer Specifications

Item 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

445
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

446
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

447
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

448
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20X

Printer Specifications

Item 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

449
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

450
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

451
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

452
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T60

Printer Specifications

Item 58mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T60

Printer lang • Printer.MODEL_CHINESE

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

453
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

454
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

455
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
type
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3

addSymbol • Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

456
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T70

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

ANK model 416 x 1662 dots 512 x 831 dots


Initial page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

ANK model 416 x 1662 dots 512 x 1662 dots


Maximum page mode area Multiple languages
576 x 1662 dots
model

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T70

• Printer.MODEL_ANK
Printer lang • Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

457
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

458
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

459
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
type
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3

addSymbol • Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

460
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T70II

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

ANK model 416 x 1662 dots 512 x 1662 dots


Initial page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

ANK model 416 x 1662 dots 512 x 1662 dots


Maximum page mode area Multiple languages
576 x 1662 dots
model

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T70

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

461
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

462
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

463
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

464
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T81II

Printer Specifications

Item 58mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T81

• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

465
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

466
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

467
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
type
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3

addSymbol • Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

468
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T81III

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T81

• Printer.MODEL_ANK
Printer lang • Printer.MODEL_CHINESE
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

469
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

470
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

471
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

472
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

473
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

474
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

475
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

476
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82II

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

477
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

478
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

479
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

480
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82III

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Standerd mode 420 x 1662 dots 576 x 1662 dots


Initial page mode area
42 column mode 378 x 1662 dots 546 x 1662 dots

Standerd mode 464 x 3324 dots 639 x 3324 dots


Maximum page mode area
42 column mode 639 x 3324 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

• Printer.MODEL_ANK
Printer lang • Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

481
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

482
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

483
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

484
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

485
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82IIIL

Printer Specifications

Item 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

486
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

487
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

488
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

489
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82X

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

490
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

491
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

492
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

493
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T83II

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 512 x 1662 dots

Maximum page mode area 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T83

Printer lang • Printer.MODEL_KOREAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

494
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

495
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

496
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

497
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T83III

Printer Specifications

Item 80mm Specification


Amount of initial feed 30 dots

for Korea 546 x 831 dots


Initial page mode area
Other 576 x 831 dots

for Korea 546 x 1662 dots


Maximum page mode area
Other 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T83III

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

498
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

499
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

500
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

501
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88V

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

502
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

503
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

504
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

505
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88VI

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

506
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

507
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

508
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

509
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

510
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensityDIP
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
setPrinterSetting • Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
value
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13
• Printer.Setting.PrintSpeed14

listener -

printerModel • TM-T88VI

• -A
downloadFirmwareList option
• -B

listener -

511
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• LineDisplay.DM_D110
displaySeries • LineDisplay.DM_D30
LineDisplay
• LineDisplay.DM_D70

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

512
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88VII

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Standerd mode 360 x 1662 dots 512 x 1662 dots


Initial page mode area
48 column mode 360 x 1662 dots 480 x 1662 dots

Standerd mode 360 x 4800 dots 512 x 4800 dots


Maximum page mode area
48 column mode 360 x 4800 dots 480 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88VII

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

513
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

514
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
addBarcode • Printer.BARCODE_GS1_DATABAR_LIMITED
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

515
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

516
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

517
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensityDIP
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
• Printer.Setting.PrintDensity115

setPrinterSetting • Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
• Printer.Setting.PrintDensity130
value • Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13
• Printer.Setting.PrintSpeed14
• Printer.Setting.PrintSpeed15
• Printer.Setting.PrintSpeed16
• Printer.Setting.PrintSpeed17

listener -

518
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• LineDisplay.DM_D110
displaySeries • LineDisplay.DM_D30
LineDisplay
• LineDisplay.DM_D70

context -

519
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T100

Printer Specifications

Item 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T100

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_CHINESE

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

520
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

521
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

522
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

523
Chapter 4 Device Specifications - Printer-specific Support Information

TM-L90 Liner-Free Label Printer Model

Printer Specifications

Die-cut Label Specifica-


Item Receipt Specification
tion
Amount of initial feed 30 dots

Monochrome print-
576 x 738 dots 560 x 738 dots
Initial page mode area ing

Two-color printing 576 x 369 dots 560 x 369 dots

Monochrome print-
576 x 1476 dots 560 x 1476 dots
Maximum page mode area ing

Two-color printing 576x 738 dots 560 x 738 dots

Baseline of Font A 21 dots from the top of the character

ANK: 16
Baseline of Font B
Chinese characters: 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_L90LFC

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

524
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
addImage • Printer. MODE_MONO_HIGH_DENSITY
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

525
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

526
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
type • Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6

• Printer.LEVEL_0
• Printer.LEVEL_1
addSymbol • Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

527
Chapter 4 Device Specifications - Printer-specific Support Information

TM-U220

Printer Specifications

76mm Specifica- 69.5mm Specifi- 57.5mm Specifi-


Item
tion cation cation
Amount of initial feed 12 dots

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_U220

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

528
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

key1 • Integer from 1 to 255


addLogo
key2 • Printer.PARAM_DEFAULT

529
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

530
Chapter 4 Device Specifications - Printer-specific Support Information

TM-U330

Printer Specifications

76mm Specifica- 69.5mm Specifi- 57.5mm Specifi-


Item
tion cation cation
Amount of initial feed 12 dots

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_U330

Printer lang • Printer.MODEL_CHINESE

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

531
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

key1 • Integer from 1 to 255


addLogo
key2 • Printer.PARAM_DEFAULT

532
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_CODE39
type
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
addBarcode • Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

data -

• Printer.SYMBOL_QRCODE_MODEL_1
type
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_L
addSymbol • Printer.LEVEL_M
• Printer.LEVEL_Q
level
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

addFeedPosition position • Printer.FEED_CUTTING

533
Chapter 4 Device Specifications - Printer-specific Support Information

EU-m30

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 4800 dots 576 x 4800 dots

Maximum page mode area 420 x 4800 dots 576 x 4800 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.EU_M30

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

534
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

535
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type • Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_CODE128_AUTO
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

536
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

537
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

538
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
setPrinterSetting • Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
value
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13

listener -

539
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P20

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 384 x 2400 dots

Maximum page mode area 384 x 2400 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 16 dots from the top of the character

Baseline of Font D 21 dots from the top of the character

Baseline of Font E 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P20

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

540
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

541
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
• Printer.BARCODE_GS1_DATABAR_EXPANDED
addBarcode
• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
• Printer.FONT_C
font • Printer.FONT_D
• Printer.FONT_E
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

542
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

543
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_1
• Printer.PATTERN_2
• Printer.PATTERN_3
• Printer.PATTERN_4
• Printer.PATTERN_5
pattern
• Printer.PATTERN_6
• Printer.PATTERN_7
addSound • Printer.PATTERN_8
• Printer.PATTERN_9
• Printer.PATTERN_10
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

• 1000 to 25500
cycle
• Printer.PARAM_DEFAULT

• Printer.FEED_CUTTING
addFeedPosition position • Printer.FEED_CURRENT_TOF
• Printer.FEED_NEXT_TOF

544
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.LAYOUT_RECEIPT
type
• Printer.LAYOUT_RECEIPT_BM

width • Integer from 1 to 10000

• Receipt (without black mark)


height
• Receipt (with black mark)

• Receipt (without black mark)


marginTop
addLayout • Receipt (with black mark)

• Receipt (without black mark)


marginBottom
• Receipt (with black mark)

• Receipt (without black mark)


offsetCut
• Receipt (with black mark)

• Receipt (without black mark)


offsetLabel
• Receipt (with black mark)

• Integer from 5000 to 600000


timeout
• Printer.PARAM_DEFAULT
getMaintenanceCounter
type • Printer.MaintenanceCounter.PaperFeed

listener -

• Integer from 5000 to 600000


timeout
• Printer.PARAM_DEFAULT
resetMaintenanceCounter
type • Printer.MaintenanceCounter.PaperFeed

listener -

• Integer from 5000 to 600000


timeout
• Printer.PARAM_DEFAULT

getPrinterSetting • Printer.Setting.PrintDensity
type
• Printer.Setting.PrintSpeed

listener -

545
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PrintDensity
type
• Printer.Setting.PrintSpeed

• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
setPrinterSetting • Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
value • Printer.Setting.PrintDensity125
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10

listener -

546
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P60 (Receipt)

Printer Specifications

Item 58mm Specification 60mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 1200 dots 432 x 1200 dots

Maximum page mode area 420 x 1200 dots 432 x 1200 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P60

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

547
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

548
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode • Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

549
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

550
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P60 (Peeler)

Printer Specifications

Item 58mm Specification 60mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 1200 dots 432 x 1200 dots

Maximum page mode area 420 x 1200 dots 432 x 1200 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P60

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

551
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

552
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode • Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

553
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

554
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

555
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P60II (Receipt)

Printer Specifications

Die-cut Label Specifica-


Item Receipt Specification
tion
Amount of initial feed 30 dots

Initial page mode area 432 x 1624 dots 400 x 1624 dots

Maximum page mode area 432 x 1624 dots 400 x 1624 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Baseline of Font C 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P60II

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

556
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

557
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode • Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

558
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

559
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_1
• Printer.PATTERN_2
• Printer.PATTERN_3
• Printer.PATTERN_4
• Printer.PATTERN_5
pattern
• Printer.PATTERN_6
• Printer.PATTERN_7
addSound • Printer.PATTERN_8
• Printer.PATTERN_9
• Printer.PATTERN_10
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

• 1000 to 25500
cycle
• Printer.PARAM_DEFAULT

560
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P60II (Peeler)

Printer Specifications

Die-cut Label Specifica-


Item Receipt Specification
tion
Amount of initial feed 30 dots

Initial page mode area 432 x 1624 dots 400 x 1624 dots

Maximum page mode area 432 x 1624 dots 400 x 1624 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Baseline of Font C 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P60II

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

561
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

562
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode • Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

563
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

564
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_1
• Printer.PATTERN_2
• Printer.PATTERN_3
• Printer.PATTERN_4
• Printer.PATTERN_5
pattern
• Printer.PATTERN_6
• Printer.PATTERN_7
addSound • Printer.PATTERN_8
• Printer.PATTERN_9
• Printer.PATTERN_10
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

• 1000 to 25500
cycle
• Printer.PARAM_DEFAULT

565
Chapter 4 Device Specifications - Printer-specific Support Information

TM-P80

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 576 x 1662 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 21 dots from the top of the character

Baseline of Font C 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_P80

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

566
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

567
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

568
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

569
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_1
• Printer.PATTERN_2
• Printer.PATTERN_3
• Printer.PATTERN_4
• Printer.PATTERN_5
pattern
• Printer.PATTERN_6
• Printer.PATTERN_7
addSound • Printer.PATTERN_8
• Printer.PATTERN_9
• Printer.PATTERN_10
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

• 1000 to 25500
cycle
• Printer.PARAM_DEFAULT

• Printer.FEED_CUTTING
addFeedPosition position • Printer.FEED_CURRENT_TOF
• Printer.FEED_NEXT_TOF

570
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.LAYOUT_RECEIPT
type
• Printer.LAYOUT_RECEIPT_BM

width • Integer from 1 to 10000

• Receipt (without black mark)


height
• Receipt (with black mark)

• Receipt (without black mark)


marginTop
addLayout • Receipt (with black mark)

• Receipt (without black mark)


marginBottom
• Receipt (with black mark)

• Receipt (without black mark)


offsetCut
• Receipt (with black mark)

• Receipt (without black mark)


offsetLabel
• Receipt (with black mark)

571
Chapter 4 Device Specifications - Printer-specific Support Information

TM-H6000V

Printer Specifications

Endorse-
Valida- Endorse-
Item Receipt Slip ment
tion ment
(40cpl)
Amount of initial feed 30 dots 24 dots 18 dots

512 x 1662
Initial page mode area 540 x 1408 dots -
dots

512 x 2400
Maximum page mode area 540 x 1408 dots -
dots

21 dots 7 dots
from the from the
Baseline of Font A 9 dots from the top of the character
top of the top of the
character character

21 dots
from the
Baseline of Font B 9 dots from the top of the character -
top of the
character

18 dots
from the
Baseline of Font C -
top of the
character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_H6000

• Printer.MODEL_ANK
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

572
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

573
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode • Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

574
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

575
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535


addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
lineStyle • Printer.LINE_MEDIUM
• Printer.LINE_THICK

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries
LineDisplay • LineDisplay.DM_D210

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

576
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T20II-i

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 420 x 831 dots 576 x 831 dots

Maximum page mode area 420 x 1662 dots 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T20

Printer lang • Printer.MODEL_ANK

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

577
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

578
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

579
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

580
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

581
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T70-i

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

ANK model 416 x 1662 dots 512 x 831 dots


Initial page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

ANK model 416 x 1662 dots 512 x 1662 dots


Maximum page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T70

• Printer.MODEL_ANK
Printer lang • Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

582
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

583
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

584
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
type
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3

addSymbol • Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

585
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T82II-i

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 576 x 831 dots

Maximum page mode area 576 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T82

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

586
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

587
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

588
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

589
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

590
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T83II-i

Printer Specifications

Item Specification
Amount of initial feed 30 dots

Initial page mode area 512 x 1662 dots

Maximum page mode area 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T83

Printer lang • Printer.MODEL_KOREAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

591
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage • Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

592
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

593
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

594
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

595
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88V-i

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

596
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

597
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

598
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

599
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

600
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88VI-iHUB

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

601
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

602
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

603
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

604
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageLine y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

x1 • Integer from 0 to 65535

y1 • Integer from 0 to 65535

x2 • Integer from 0 to 65535

addPageRectangle y2 • Integer from 0 to 65535

• Printer.LINE_THIN
• Printer.LINE_MEDIUM
lineStyle
• Printer.LINE_THICK
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
addSound • Printer.PATTERN_E
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 1 to 255
repeat
• Printer.PARAM_DEFAULT

605
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Integer from 5000 to 600000
timeout
• Printer.PARAM_DEFAULT

list -

• Printer.Setting.PaperWidth
type • Printer.Setting.PrintDensity
• Printer.Setting.PrintSpeed

• Printer.Setting.PaperWidth58_0
• Printer.Setting.PaperWidth80_0
• Printer.Setting.PrintDensityDIP
• Printer.Setting.PrintDensity70
• Printer.Setting.PrintDensity75
• Printer.Setting.PrintDensity80
• Printer.Setting.PrintDensity85
• Printer.Setting.PrintDensity90
• Printer.Setting.PrintDensity95
• Printer.Setting.PrintDensity100
• Printer.Setting.PrintDensity105
• Printer.Setting.PrintDensity110
setPrinterSetting • Printer.Setting.PrintDensity115
• Printer.Setting.PrintDensity120
• Printer.Setting.PrintDensity125
value
• Printer.Setting.PrintDensity130
• Printer.Setting.PrintSpeed1
• Printer.Setting.PrintSpeed2
• Printer.Setting.PrintSpeed3
• Printer.Setting.PrintSpeed4
• Printer.Setting.PrintSpeed5
• Printer.Setting.PrintSpeed6
• Printer.Setting.PrintSpeed7
• Printer.Setting.PrintSpeed8
• Printer.Setting.PrintSpeed9
• Printer.Setting.PrintSpeed10
• Printer.Setting.PrintSpeed11
• Printer.Setting.PrintSpeed12
• Printer.Setting.PrintSpeed13
• Printer.Setting.PrintSpeed14

listener -

printerModel • TM-T88VI-iHUB

• -A
downloadFirmwareList option
• -B

listener -

606
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• LineDisplay.DM_D110
displaySeries • LineDisplay.DM_D30
LineDisplay
• LineDisplay.DM_D70

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

607
Chapter 4 Device Specifications - Printer-specific Support Information

TM-U220-i

Printer Specifications

76mm Specifica- 69.5mm Specifi- 57.5mm Specifi-


Item
tion cation cation
Amount of initial feed 12 dots

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_U220

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

608
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
mode • Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

609
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


displaySeries • LineDisplay.DM_D110
LineDisplay
context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

610
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T70II-DT

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

ANK model 416 x 1662 dots 512 x 1662 dots


Initial page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

ANK model 416 x 1662 dots 512 x 1662 dots


Maximum page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T70

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

611
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

612
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

613
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

614
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries
LineDisplay • LineDisplay.DM_D30

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

615
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T70II-DT2

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

ANK model 416 x 1662 dots 512 x 1662 dots


Initial page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

ANK model 416 x 1662 dots 512 x 1662 dots


Maximum page mode area Multiple languages
416 x 1662 dots 576 x 1662 dots
model

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T70

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

616
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

617
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

618
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

619
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries • LineDisplay.DM_D30
LineDisplay
• LineDisplay.DM_D70

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

addText • Integer from 1 to 19


y
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


r
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


g
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


b
• LineDisplay.PARAM_UNUSE

620
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88V-DT

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

621
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

622
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

623
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

624
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries
LineDisplay • LineDisplay.DM_D30

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

625
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88VI-DT2

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

ANK 16 dots from the top of the character


Baseline of Font B
Chinese characters 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_SOUTHASIA

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

626
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

627
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

628
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
type • Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
• Printer.SYMBOL_AZTECCODE_FULLRANGE
• Printer.SYMBOL_AZTECCODE_COMPACT
• Printer.SYMBOL_DATAMATRIX_SQUARE
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_8
addSymbol
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_12
• Printer.SYMBOL_DATAMATRIX_RECTANGLE_16

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
level
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Integer from 5 to 95
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

629
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.PATTERN_NONE
• Printer.PATTERN_A
• Printer.PATTERN_B
• Printer.PATTERN_C
pattern • Printer.PATTERN_D
• Printer.PATTERN_E
addSound
• Printer.PATTERN_ERROR
• Printer.PATTERN_PAPER_EMPTY
• Printer.PARAM_DEFAULT

• 0
repeat • 1 to 255
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries • LineDisplay.DM_D30
LineDisplay
• LineDisplay.DM_D70

context -

data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

addText • Integer from 1 to 19


y
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


r
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


g
• LineDisplay.PARAM_UNUSE

• Integer from 0 to 255


b
• LineDisplay.PARAM_UNUSE

630
Chapter 4 Device Specifications - Printer-specific Support Information

TM-H6000IV-DT

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_H6000

• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

631
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

632
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

633
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

• LineDisplay.DM_D110
displaySeries
LineDisplay • LineDisplay.DM_D30

context -

634
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• LineDisplay.LANG_EN (default)
• LineDisplay.LANG_JA
lang
• LineDisplay.PARAM_DEFAULT
addText • LineDisplay.PARAM_UNUSE

• Integer from 1 to 44
x
• LineDisplay.PARAM_UNUSE

• Integer from 1 to 19
y
• LineDisplay.PARAM_UNUSE

635
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T88IV

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Monochrome print-
360 x 831 dots 512 x 831 dots
Initial page mode area ing

Two-color printing 360 x 415 dots 512 x 415 dots

Monochrome print-
360 x 1662 dots 512 x 1662 dots
Maximum page mode area ing

Two-color printing 360 x 831 dots 512 x 831 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T88

• Printer.MODEL_ANK
Printer lang • Printer.MODEL_CHINESE
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

636
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
addImage • Printer. MODE_MONO_HIGH_DENSITY
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

637
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

638
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
type
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3

addSymbol • Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

639
Chapter 4 Device Specifications - Printer-specific Support Information

TM-T90

Printer Specifications

58mm Specifica- 60mm Specifica- 80mm Specifica-


Item
tion tion tion
Amount of initial feed 30 dots

Monochrome print-
420 x 738 dots 384 x 831 dots 576 x 738 dots
Initial page mode area ing

Two-color printing 420 x 369 dots 384 x 415 dots 576 x 369 dots

Monochrome print-
420 x 1476 dots 384 x 1662 dots 576 x 1476 dots
Maximum page mode area ing

Two-color printing 420 x 738 dots 384 x 831 dots 576 x 738 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_T90

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
• Printer.FONT_B
addTextFont font
• Printer.FONT_C
• Printer.PARAM_DEFAULT

640
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
addImage • Printer. MODE_MONO_HIGH_DENSITY
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

641
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode • Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font • Printer.FONT_C
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

data -

• Printer.SYMBOL_PDF417_STANDARD
type
• Printer.SYMBOL_PDF417_TRUNCATED

• Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2

addSymbol • Printer.LEVEL_3
• Printer.LEVEL_4
level • Printer.LEVEL_5
• Printer.LEVEL_6
• Printer.LEVEL_7
• Printer.LEVEL_8
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

642
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

643
Chapter 4 Device Specifications - Printer-specific Support Information

TM-L90

Printer Specifications

Die-cut Label Specifica-


Item Receipt Specification
tion
Amount of initial feed 30 dots

Monochrome print-
576 x 738 dots 560 x 738 dots
Initial page mode area ing

Two-color printing 576 x 369 dots 560 x 369 dots

Monochrome print-
576 x 1476 dots 560 x 1476 dots
Maximum page mode area ing

Two-color printing 576x 738 dots 560 x 738 dots

Baseline of Font A 21 dots from the top of the character

ANK: 16
Baseline of Font B
Chinese characters: 15 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_L90

• Printer.MODEL_ANK
• Printer.MODEL_CHINESE
Printer lang • Printer.MODEL_TAIWAN
• Printer.MODEL_KOREAN
• Printer.MODEL_THAI

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

644
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT
addTextStyle
• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
• Printer.COLOR_2
color
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color • Printer.COLOR_2
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
addImage • Printer. MODE_MONO_HIGH_DENSITY
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

645
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
type • Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128

• Printer.HRI_NONE (default)
addBarcode
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

646
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
type • Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
• Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6

• Printer.LEVEL_0
• Printer.LEVEL_1
addSymbol • Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

647
Chapter 4 Device Specifications - Printer-specific Support Information

TM-H6000IV

Printer Specifications

Item 58mm Specification 80mm Specification


Amount of initial feed 30 dots

Initial page mode area 360 x 831 dots 512 x 831 dots

Maximum page mode area 360 x 1662 dots 512 x 1662 dots

Baseline of Font A 21 dots from the top of the character

Baseline of Font B 16 dots from the top of the character

Parameter Restrictions

API Parameter Specificable Setting Value


printerSeries • Printer.TM_H6000

• Printer.MODEL_CHINESE
Printer lang
• Printer.MODEL_TAIWAN

context -

• Printer.LANG_EN (default)
• Printer.LANG_JA
• Printer.LANG_ZH_CN
• Printer.LANG_ZH_TW
addTextLang lang
• Printer.LANG_KO
• Printer.LANG_TH
• Printer.LANG_VI
• Printer.PARAM_DEFAULT

• Printer.FONT_A (default)
addTextFont font • Printer.FONT_B
• Printer.PARAM_DEFAULT

648
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


• Printer.TRUE
• Printer.FALSE (default)
reverse
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
ul
• Printer.PARAM_UNSPECIFIED
addTextStyle • Printer.PARAM_DEFAULT

• Printer.TRUE
• Printer.FALSE (default)
em
• Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

• Printer.COLOR_1 (default)
color • Printer.PARAM_UNSPECIFIED
• Printer.PARAM_DEFAULT

data -

x • Integer from 0 to 65534

y • Integer from 0 to 65534

width • Integer from 1 to 65535

height • Integer from 1 to 65535

• Printer.COLOR_1
color
• Printer.PARAM_DEFAULT

• Printer.MODE_MONO
• Printer.MODE_GRAY16
mode
• Printer. MODE_MONO_HIGH_DENSITY
addImage
• Printer.PARAM_DEFAULT

• Printer.HALFTONE_DITHER
• Printer.HALFTONE_ERROR_DIFFUSION
halftone
• Printer.HALFTONE_THRESHOLD
• Printer.PARAM_DEFAULT

• Real number from 0.1 to 10.0


brightness
• Printer.PARAM_DEFAULT

• Printer.COMPRESS_DEFLATE
• Printer.COMPRESS_NONE
compress
• Printer.COMPRESS_AUTO
• Printer.PARAM_DEFAULT

649
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.BARCODE_UPC_A
• Printer.BARCODE_UPC_E
• Printer.BARCODE_EAN13
• Printer.BARCODE_JAN13
• Printer.BARCODE_EAN8
• Printer.BARCODE_JAN8
• Printer.BARCODE_CODE39
• Printer.BARCODE_ITF
type
• Printer.BARCODE_CODABAR
• Printer.BARCODE_CODE93
• Printer.BARCODE_CODE128
• Printer.BARCODE_GS1_128
• Printer.BARCODE_GS1_DATABAR_OMNIDIRECTIONAL
• Printer.BARCODE_GS1_DATABAR_TRUNCATED
• Printer.BARCODE_GS1_DATABAR_LIMITED
addBarcode
• Printer.BARCODE_GS1_DATABAR_EXPANDED

• Printer.HRI_NONE (default)
• Printer.HRI_ABOVE
• Printer.HRI_BELOW
hri
• Printer.HRI_BOTH
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.FONT_A (default)
• Printer.FONT_B
font
• Printer.PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Integer from 2 to 6
width
• Printer.PARAM_UNSPECIFIED

• Integer from 1 to 255


height
• Printer.PARAM_UNSPECIFIED

650
Chapter 4 Device Specifications - Printer-specific Support Information

API Parameter Specificable Setting Value


data -

• Printer.SYMBOL_PDF417_STANDARD
• Printer.SYMBOL_PDF417_TRUNCATED
• Printer.SYMBOL_QRCODE_MODEL_1
• Printer.SYMBOL_QRCODE_MODEL_2
• Printer.SYMBOL_MAXICODE_MODE_2
• Printer.SYMBOL_MAXICODE_MODE_3
type • Printer.SYMBOL_MAXICODE_MODE_4
• Printer.SYMBOL_MAXICODE_MODE_5
• Printer.SYMBOL_MAXICODE_MODE_6
• Printer.SYMBOL_GS1_DATABAR_STACKED
• Printer.SYMBOL_GS1_DATABAR_STACKED_
OMNIDIRECTIONAL
• Printer.SYMBOL_GS1_DATABAR_EXPANDED_STACKED
addSymbol • Printer.LEVEL_0
• Printer.LEVEL_1
• Printer.LEVEL_2
• Printer.LEVEL_3
• Printer.LEVEL_4
• Printer.LEVEL_5
• Printer.LEVEL_6
level • Printer.LEVEL_7
• Printer.LEVEL_8
• Printer.LEVEL_L
• Printer.LEVEL_M
• Printer.LEVEL_Q
• Printer.LEVEL_H
• Printer. PARAM_DEFAULT
• Printer.PARAM_UNSPECIFIED

• Printer.CUT_FEED
addCut type • Printer.CUT_NO_FEED
• Printer.PARAM_DEFAULT

651
Chapter 4 Device Specifications - Usage restriction by firmware version

Usage restriction by firmware version


Availability and restriction on the use of APIs and parameters depends on the versions of the firmware and
software installed on the printer. For how to check the versions and/or update the firmware and software, refer to
the Technical Reference Guide of the printer.

TM-i Series/TM-DT Series


❏ Supported by TM-DT software Ver. 2.5 and TM-i firmware 4.0 or later.

Class API Parameter Value


CommBox class - - -

❏ Supported by TM-DT software Ver. 2.5 and TM-i firmware 4.1 or later.

Class API Parameter Value


requestPrintJobStatus - -

addSymbol data QR Code Micro


Printer class
addSymbol type Printer.SymbolType.QRCodeMicro

setReceiveEventListener args PrintJobId

❏ Supported by TM-DT software Ver. 3.02 and TM-i firmware 4.4 or later.

Class API Parameter Value


Discovery class - - -

❏ Supported by TM-DT software Ver. 4.0 or later.

Class API Parameter Value


POSKeyboard class - - -

MSR class - - -

OtherPeripheral class - - -

Discovery.TYPE_POS_KEYBOARD

Discovery class start deviceType Discovery.TYPE_MSR

Discovery.TYPE_OTHER_PERIPHERAL

652
Chapter 4 Device Specifications - Usage restriction by firmware version

❏ Supported by TM-DT software Ver. 5.10 or later.

Class API Parameter Value


LineDisplay displaySeries LineDisplay.DM_D70

addCreateScreen - -

addCreateScreenCustom - -

addCreateTextArea - -

addDestroyTextArea - -

addSetCurrentTextArea - -

addClearCurrentTextArea - -

lang LineDisplay.LANG_MULTII

r -
addText
g -
LineDisplay class
b -

addBackgroundColor - -

addStartSlideShow - -

addStopSlideShow - -

addDownloadImage - -

addRegisterDownloadImage - -

addNVImage - -

addClearImage - -

addSymbol - -

addClearSymbol - -

TM-m30
❏ Supported by TM-m30 firmware Ver. 1.40 ESC/POS or later.

Class API Parameter Value


BarcodeScanner class - - -

❏ Supported with the following versions of firmware.


• TM-m30 firmware Ver. 1.46A ESC/POS or later
• TM-m30 firmware Ver. 1.46B ESC/POS or later

Class API Parameter Value


GermanyFiscalElement
- - -
class

653
Chapter 4 Device Specifications - Usage restriction by firmware version

TM-m30II-H/TM-m30II-NT/TM-m30II-S/TM-m30II-SL
❏ Supported by Firmware Ver.3.06A/3.06B ESC/POS or later.

Class API Parameter Value


LineDisplay displaySeries LineDisplay.DM_D70

addCreateScreen - -

addCreateScreenCustom - -

addCreateTextArea - -

addDestroyTextArea - -

addSetCurrentTextArea - -

addClearCurrentTextArea - -

lang LineDisplay.LANG_MULTI

r -
addText
g -
LineDisplay class
b -

addBackgroundColor - -

addStartSlideShow - -

addStopSlideShow - -

addDownloadImage - -

addRegisterDownloadImage - -

addNVImage - -

addClearImage - -

addSymbol - -

addClearSymbol - -

TM-T88VI
❏ Supported by TM-T88VI firmware Ver. 40.50 ESC/POS or later.

Class API Parameter Value


BarcodeScanner class - - -

654
Chapter 4 Device Specifications - Usage restriction by firmware version

TM-T88VI-iHUB
❏ Supported with the following versions of firmware.
• TM-T88VI-iHUB firmware Ver. 50.52A ESC/POS or later
• TM-T88VI-iHUB firmware Ver. 50.52B ESC/POS or later

Class API Parameter Value


GermanyFiscalElement
- - -
class

655
Chapter 5 Sample Programs - Functionality

Sample Programs
The sample programs provided with Epson ePOS SDK for Android are implementation samples of Android
applications.
Android Studio Android application projects that include the Java source files are provided.

The provided sample programs were created with sample API Level 14.

Functionality
The sample programs provide the following functionality.

ePOS2Printer
❏ Printer search and specification
• Specifies the connection type.
• Displays a list of search results.
• Retrieves target information required for the connection selected from the search results.
❏ Sample receipt printing
❏ Sample coupon printing
❏ Printer status confirmation
• Confirms the status of printers before printing.
• When the printer is not capable of printing, the program generates a notification message of the possible causes and
corresponding action of the error.
❏ Display of print results and printer status
• Sends notification of the print result after printing.
• The program generates a message corresponding to the printer status at the time that the printer result notification
was made.
• Notifies the users of an API error that occurred while searching for printers, or during printing sample receipts or cou-
pons.
❏ Log Output Settings
• Enables log output to terminal storage when displaying the main screen.
❏ Acquiring and setting the printer set values

656
Chapter 5 Sample Programs - Functionality

ePOS2 Hybrid Printer


❏ Printer search and specification
• Displays a list of search results.
• Retrieves target information required for the connection selected from the search results.
❏ Controls operations continuously from endorsement printing after MICR reading to slip and receipt printings.
❏ Validation printing
❏ Printer status confirmation
• Confirms the status of printers before printing.
• When the printer is not capable of printing, the program generates a notification message of the possible causes and
corresponding action of the error.
❏ Display of print results and printer status
• Sends notification of the print result after printing.
• The program generates a message corresponding to the printer status at the time that the printer result notification
was made.
• Notifies the users of an API error that occurred while searching for printers or printing samples.
❏ Sets the log output function.
• Enables log output to terminal storage when displaying the main screen.

ePOS2Discovery
❏ Filter Option settings
❏ Search of printers and peripheral devices
❏ Search initiation
❏ Display of search results
❏ Search completion
❏ Error notification
• Notifies the users of an API error that occurred when starting a search, during searching, or in the process of completing
a search.

ePOS2LineDisplay
❏ Display of the specified text on the customer display
❏ Turns on or off the blinking display
❏ Error notification
• When failed to connect to the customer display, notifies the user of the connection error.
• Notifies the users of an API error that occurred while sending display data to the customer display.

657
Chapter 5 Sample Programs - Functionality

ePOS2Keyboard
❏ Starts and ends connection with the printer
• Connects to the specified keyboard.
• When failed to connect to the keyboard, notifies the user of the connection error.
❏ Display of text input with the keyboard in text boxes in the application
❏ Error notification
• Notifies the users of an API error that occurred while entering text with the keyboard.

ePOS2POSKeyboard
❏ Starts and ends connection with TM-DT
• Connects to the specified keyboard.
• When failed to connect to the keyboard, notifies the user of the connection error.
❏ Display of keycode input with the keyboard in text boxes in the application
❏ Error notification
• Notifies the users of an API error that occurred while entering keycode with the keyboard.

ePOS2BarcodeScanner
❏ Starts and ends connection with the printer
• Connects to a barcode scanner specified.
• When failed to connect to the barcode scanner, notifies the user of the connection error.
❏ Display of data read by the barcode scanner in text boxes in the application
❏ Error notification
• Notifies the users of an API error that occurred while reading data with the barcode scanner.

ePOS2MSR
❏ Starts and ends connection with TM-DT
• Starts connection with the MSR specified in the Target text boxes.
• Ends connection with the connected MSR.
❏ Display of data read by the MSR in text boxes in the application
❏ Error notification
• Notifies the users of an API error that occurred while reading data with the MSR.

658
Chapter 5 Sample Programs - Functionality

ePOS2SimpleSerial
❏ Starts and ends connection with the printer
• Connects to the specified serial communication device.
• When failed to connect to the serial communication device, notifies the user of the connection error.
❏ Transmission of data specified by the application to the serial communication device.
❏ Display of response commands from the serial communication device in the application
❏ Error notification
• Notifies the users of an API error that occurred while sending data to the serial communication device.

ePOS2GermanyFiscalElement
❏ Peripheral device settings
• Searches for the printer, and displays the search results in a list.
• Specifies the printer to be used.
• Specifies the German fiscal element (TSE) to be used.
• Specifies the customer display to be used.
• Sets up German fiscal element (TSE) to be used.
❏ Purchase of a product
• A product is selected by pushing a button.
• The barcode is read by the barcode scanner, and the product is selected.
• Displays the price of the selected product on the customer display.
• Writes the information of the selected product to German fiscal element (TSE).
❏ Payment for a product
• Displays the total price of the products on the customer display.
• Prints the receipt.
• Writes the information of the product for which payment is finished to German fiscal element (TSE).
❏ Export from German fiscal element (TSE)
• Exports the information written to German fiscal element (TSE).
❏ Information acquisition from German fiscal element (TSE)
• Acquires the information of German fiscal element (TSE).
❏ Printer firmware update
• Acquires the firmware version of the connected printer.
• Acquires the released version of printer firmware.
• Updates the printer firmware.

659
Chapter 5 Sample Programs - Functionality

ePOS2OtherPeripheral
❏ Starts and ends connection with TM-DT
• Starts connection with the device specified in the Target text boxes.
• Ends connection with connected device.
❏ Transmission of JSON data specified by the application to the device
❏ Display of response commands from the device in the text boxes
❏ Error notification
• Notifies the users of an API error that occurred at the timing when the process was run by the device.

ePOS2CommBox
❏ Starts and ends connection with the printer
• Connects to the communication box specified.
• When failed to connect to the communication box, notifies the user of the connection error.
❏ Transmission of messages to the member ID specified by the application
❏ Error notification
• Notifies the users of an API error that occurred when sending a message.

ePOS2EasySelect
❏ Easy connection with a printer by using its NFC tag or QR code.
• Acquires printer information from the NFC tag.
• Acquires printer information from the QR code.
• Opens the port by using the acquired printer information.
❏ Printing of a QR code that enables easy printer selection.
• Creates a QR code that contains the printer information from the printer search result.

660
Chapter 5 Sample Programs - Use Environment

Use Environment
Refer to Epson ePOS SDK for Android Development Environment and Application Operating Environment.

Installation Procedure

1 Extract the sample programs from the zip file and store the extracted files at any desired
location.

2 Start Android Studio and click Open an existing Android Studio Project.

661
Chapter 5 Sample Programs - Installation Procedure

3 Select a sample program you want to install from the sample programs you stored at
step 1, and then click OK.

4 Click the Run app button.

662
Chapter 5 Sample Programs - Installation Procedure

5 Select the device and then click OK.

663
Chapter 6 Application Guide - To connect via USB

Application Guide
To connect via USB
For a USB interface, we recommend obtaining access permission to USB devices in the application software.

To open a port using the connect without obtaining access permission to USB devices in advance, note the
following:
• When [OK] is pressed in the dialog box for access permission acquisition, it takes about 10 seconds to
open a port.
• When [Cancel] is pressed in the dialog box for access permission acquisition, the state of waiting for the
timeout lasts for 30 seconds.

How to obtain access permission in the application software is as follows:

1 Add the following code to AndroidManifest.xml.


<manifest ...>
<application>
<activity ...>
<intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"
android:resource="@xml/device_filter" />
</activity>
</application>
</manifest>

2 Add res/xml/device_filter.xml to the source file.

3 Write the following code in the device_filter.xml file.


<?xml version="1.0" encoding="utf-8"?>
<resources>
<usb-device vendor-id="1208" />
</resources>

4 A dialog box appears when obtaining access permission. Press [OK].

664
Chapter 6 Application Guide - To search printers

To search printers
Starts searching
FilterOption filterOption = null;
filterOption = new FilterOption();

//Specifies the port to search


filterOption.PortType = Discovery.SOCKET_ALL;

//Specifies the Boradcast address.


filterOption.broadcast = "255.255.255.255";

//Specifies the device model to search.


filterOption.deviceModel = Discovery.MODEL_ALL;

//Specifies the device type to search.


filterOption.deviceType = Discovery.TYPE_ALL;

Starts searching
try {
Discovery.start(mContext, filterOption, mDiscoveryListener);
}
catch (Exception e) {
//Displays error messages
}
Notifies the detected devices
private DiscoveryListener mDiscoveryListener = new DiscoveryListener() {
@Override
public void onDiscovery(final DeviceInfo deviceInfo) {
runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
//Display the detected device in the application software
}
});
}
};

Stops searching
private void stopDiscovery() {
try {
Discovery.stop();
}
catch (Epos2Exception e) {
//Displays error messages
}
}

665
Chapter 6 Application Guide - To monitor continuously

To monitor continuously
When application starts
Printer printer = null;

try {
printer = new Printer(printer.TM_T88, printer.MODEL_ANK, this);
}
catch (Exception e) {
//Displays error messages
}

printer.setStatusChangeEventListener(this);

try {
printer.connect("TCP:192.168.192.168", printer.PARAM_DEFAULT);
}
catch (Exception e) {
//Displays error messages
}

try {
printer.setInterval(3000);
printer.startMonitor();
}
catch (Exception e) {
//Displays error messages
}

Repeats
//Buffers the print data(addText..)
//Sends the print data (sendData)

When application closes


try {
printer.stopMonitor();
}
catch (Exception e) {
//Displays error messages
}
try {
printer.disconnect();
}
catch (Exception e) {
//Displays error messages
}

666
Chapter 6 Application Guide - To monitor continuously

public void onPtrStatusChange(Printer printerObj, final int eventType) {


runOnUiThread(new Runnable() {
@Override
public synchronized void run() {
switch (eventType) {
case Printer.EVENT_ONLINE:
break;
case Printer.EVENT_OFFLINE:
//Displays notification messages
break;
case Printer.EVENT_POWER_OFF:
//Displays notification messages
break;
case Printer.EVENT_COVER_CLOSE:
//Displays notification messages
break;
case Printer.EVENT_COVER_OPEN:
//Displays notification messages
break;
case Printer.EVENT_PAPER_OK:
//Displays notification messages
break;
case Printer.EVENT_PAPER_NEAR_END:
//Displays notification messages
break;
case Printer.EVENT_PAPER_EMPTY:
//Displays notification messages
break;
case Printer.EVENT_DRAWER_HIGH:
//Displays notification messages
break;
case Printer.EVENT_DRAWER_LOW:
//Displays notification messages
break;
case Printer.EVENT_BATTERY_ENOUGH:
//Displays notification messages
break;
case Printer.EVENT_BATTERY_EMPTY:
//Displays notification messages
break;
default:
break;
}
}
});
}

Refer to Error Status and countermeasures for the messages displayed on "Displays notification messages".

667
Chapter 6 Application Guide - To use the same printer from multiple mobile devices

To use the same printer from multiple mobile devices


The following shows a processing flow when using a single printer from the mobile terminal A and B.

The diagram below shows the process flow for controlling a TM printer.

Mobile terminal A Printer Mobile terminal B

1 : connect

Mobile terminal A SUCCESS


able to print 2 : connect

3 : sendData

Printing processing Waits for terminal A's


disconnect

5 : disconnect

SUCCESS Mobile terminal B


able to print
4 : sendData

Printing processing
SUCCESS

6 : disconnect

668
Chapter 6 Application Guide - To specify a transaction

To specify a transaction
Put the set of print processing to be carried out consecutively (such as a single receipt or a single coupon)
between beginTransaction and endTransaction.

Application Printer

1 : connect

Transaction 2 : beginTransaction

3 : sendData

Printing processing

4 : sendData

Printing processing

5 : endTransaction

6 : disconnect

669
Chapter 6 Application Guide - To reconnect to the network automatically

To reconnect to the network automatically


The following is a sequence for automatically reconnecting if network communication is cut off with the printer.

The following uses a case where the barcode scanner is used as an example.

Printer Barcode
Applications Scanner

1: BarcodeScanner

Initialize BarcodeScanner class

2: setConnectionEventListener

Registers the reconnection event listener

3: Registration of Listener according to the device

4: connect
4.1: Cmd
Establishes the communication path
5: Device open

6: Scan
Network is cut off

2.1: Reconnection process started event 6.1: Scan data


Notify the starting
of reconnection Stores the data with
the TM-DT software and
TM-i firmware
Network reconnection was done successfully

2.2: Reconnection ended event


Notify the reconnection
completion
6.1.1: Barcode data detection event

Sends the data stored with


the TM-DT software and
TM-i firmware

7: disconnect
7.1: Cmd
Disconnects the communication path
8: Device close

9: Disconnection event
Notify the disconnection

670
Chapter 6 Application Guide - To transmit and receive the data between applications

To transmit and receive the data between applications


Use the Communication Box function of the printer.
For details on a printer equipped with the Communication Box function, refer to Functions provided in each
printer.
The following indicates the basic programming sequence using the Communication Box. A "Client" in the
sequence figure refers to an application.

Client A Printer Client B Client C

1: CommBox

Initialize CommBox class


1: CommBox
2: setReceiveEventListener Initialize CommBox class

2: setReceiveEventListener

1: CommBox

3: connect Initialize CommBox class

Establishes the communication path 2: setReceiveEventListener

Acquires
CommboxManager object

Opens the Communication Box


3.1: Creates the Communication Box

3.2: Adds Client A to members

3: connect

Establishes the communication path


Acquires
CommboxManager object

Opens the Communication Box

3.1: Adds Client B to members

3: connect

Establishes the communication path


Acquires
CommboxManager object

Opens the Communication Box

3.1: Adds Client C to members

671
Chapter 6 Application Guide - To transmit and receive the data between applications

Client A Printer Client B Client C

4: sendData
4.1: Designates client to forward the data to
Sends data

4.2: Message received event

Forwards data
4.2: Message received event

Forwards data

5: disconnect

Closes the Communication Box

5.1: Deletes Client C from members

5: disconnect

Closes the Communication Box

5.1: Deletes Client B from members

5: disconnect

Closes the Communication Box 5.1: Deletes Client A from members

5.3: Ends the Communication Box

672
Chapter 6 Application Guide - To perform forward printing

To perform forward printing


Use the spooler function of printers.
For details on a printer equipped with the spooler function, refer to Functions provided in each printer.
If a request is sent to the printer equipped with the spooler function from the application when the spooler
function is disabled, printing is immediately executed and a response is returned to the application after printing
completes.

Printer equipped with


Applications the spooler function Printer

1: sendData
1.1: Cmd
1.1.1: Print

1.2: Printing results


1.3: callback(SUCCESS)

If a request is sent to the printer equipped with the spooler function from the application when the spooler
function is enabled, the print job is stored in the print queue and a response is returned to the application before
printing completes.

Printer equipped with


Applications the spooler function Spooler Printer

1: sendData
1.1: send

1.2: Execution result


1.3: callback(SUCCESS)

2: Cmd
2.1: Print

Printing results
3: requestPrintJobStatus(printjobid)
3.1: requestPrintJobStatus

3.2: Printing results


3.3: callback(SUCCESS)

673
Chapter 6 Application Guide - To perform forward printing

If the destination printer cannot print, the printer equipped with the spooler function does not return the error
to the application. Enabling forward printing will allow for the printing task to be completed on a substitute
printer, with the application acquiring the printing results afterward. Refer to the sequence diagram below.
Printer equipped with Forwarding
Applications the spooler function Spooler Printer printer

1: sendData
1.1: send

1.2: Execution result


1.3: callback(SUCCESS)

2: Cmd
2.1: Print

Printing results (Failure)


3: Cmd
3.1: Print

Printing results (Success)


4: requestPrintJobStatus
(printjobid)
4.1: requestPrintJobStatus

4.2: Printing results


4.3: callback(SUCCESS)

674
Chapter 6 Application Guide - To select a printer using its NFC tag

To select a printer using its NFC tag


Analyze the NFC tag by using parseNFC in the EasySelect class. Then, specify the analyzed information in the
connect API to connect to the printer.

Printer printer;

@Override
protected void onNewIntent(Intent intent) {

//Receives NFC tag by onNewIntent

EasySelect easySelect = new EasySelect();

Tag tag = (Tag)intent.getParcelableExtra( NfcAdapter.EXTRA_TAG );

//Analyses the NFC tag


ArrayList<EasySelectInfo> easySelectInfoArray = null;
easySelectInfoArray = easySelect.parseNFC( tag, PARSE_NFC_TIMEOUT_DEFAULT );
if ((null == easySelectInfoArray) || (easySelectInfoArray.size() == 0)){
// If the NFC tag is not the one for easy printer selection
return ;
}

//Acquires the first data of the NFC


EasySelectInfo easySelectInfo = easySelectInfoArray.get(0);

String printerName = easySelectInfo.printerName;


if(printerName == null || printerName.equals("")){
printerName = "TM-T88V"; //Name of the target printer
}

// Converts the printer name into PrinterSeries


int printerSeries = convertPrinterNameToPrinterSeries(printerName);

String macAddress = easySelectInfo.macAddress;


if(macAddress == null || macAddress.equals("")){
//When failed to acquire macAddress
}

try {
// Initializes the Printer
printer = new Printer(printerSeries, Printer.MODEL_ANK, getApplicationContext());

// Generates connect parameters


String targetText = convertEasySelectInfoToTargetString(easySelectInfo);

// Connects to the printer


printer.connect(targetText, Printer.PARAM_DEFAULT);

// Exception processing
} catch (Epos2Exception e) {
// Write exception processing
}
}

675
Chapter 6 Application Guide - To select a printer using its NFC tag

private int convertPrinterNameToPrinterSeries(String printerName) {

int printerSeries = Printer.TM_T88;

if(printerName.equals("TM-T88V")){
printerSeries = Printer.TM_T88;
}else if(printerName.equals("TM-m10")){
printerSeries = Printer.TM_M10;
}else if(printerName.equals("TM-m30")){
printerSeries = Printer.TM_M30;
}else if(printerName.equals("TM-P20")){
printerSeries = Printer.TM_P20;
}else if(printerName.equals("TM-P60II")){
printerSeries = Printer.TM_P60II;
}else if(printerName.equals("TM-P80")){
printerSeries = Printer.TM_P80;
}else{
// Depending on the printer, add conversion processes
}

return printerSeries;
}

private String convertEasySelectInfoToTargetString(EasySelectInfo easySelectInfo) {

StringBuffer sb = new StringBuffer();

switch(easySelectInfo.deviceType){
case EasySelectDeviceType.TCP:
sb.append("TCP:");
break;
case EasySelectDeviceType.BLUETOOTH:
sb.append("BT:");
break;
}
sb.append(easySelectInfo.macAddress);
return sb.toString();
}

This function is available only with NFC-compatible printers.

676
Chapter 6 Application Guide - To select a printer using its QR code

To select a printer using its QR code


Analyze the QR code by using parseQR in the EasySelect class. Then, specify the analyzed information in the
connect API to connect to the printer.

EasySelect easySelect = new EasySelect();


String data;
Printer printer;

public void ConnectPrinterByQRCode() {

// Stores QR code data acquired from the scanned image

//Analyzes the QR code


EasySelectInfo easySelectInfo = easySelect.parseQR(data);
if (null == easySelectInfo) {
// If the QR code is not the one for easy printer selection
return ;
}

// Converts the printer name into PrinterSeries


int printerSeries = convertPrinterNameToPrinterSeries(easySelectInfo.printerName);

try {
// Initializes the Printer
printer = new Printer(printerSeries, Printer.MODEL_ANK, getApplicationContext());

// Generates connect parameters


String targetText = convertEasySelectInfoToTargetString(easySelectInfo);

// Connects to the printer


printer.connect(targetText, Printer.PARAM_DEFAULT);

// Exception processing
} catch (Epos2Exception e) {
// Write exception processing
}
}

private int convertPrinterNameToPrinterSeries(String printerName) {

int printerSeries = Printer.TM_T88;

if(printerName.equals("TM-T88V")){
printerSeries = Printer.TM_T88;
}else if(printerName.equals("TM-m10")){
printerSeries = Printer.TM_M10;
}else if(printerName.equals("TM-m30")){
printerSeries = Printer.TM_M30;
}else if(printerName.equals("TM-P20")){
printerSeries = Printer.TM_P20;
}else if(printerName.equals("TM-P60II")){
printerSeries = Printer.TM_P60II;
}else if(printerName.equals("TM-P80")){
printerSeries = Printer.TM_P80;
}else{
// Depending on the printer, add conversion processes
}

return printerSeries;
}

677
Chapter 6 Application Guide - To select a printer using its QR code

private String convertEasySelectInfoToTargetString(EasySelectInfo easySelectInfo) {

StringBuffer sb = new StringBuffer();

switch(easySelectInfo.deviceType){
case EasySelectDeviceType.TCP:
sb.append("TCP:");
break;
case EasySelectDeviceType.BLUETOOTH:
sb.append("BT:");
break;
}
sb.append(easySelectInfo.macAddress);
return sb.toString();
}

How to print a QR code to be used for printer selection

For the printers that can print the QR code on a status sheet
Some printers can print the QR code on a status sheet. For more details, refer to the Technical Reference Guide of
the printer.

For the printers that cannot print the QR code on a status sheet
Create the QR code by using createQR. Specify the created data by addSymbol to print the QR code.
Refer to "Creating QR code" in the Sample Programs.

678
Chapter 6 Application Guide - To perform check process

To perform check process


HybridPrinter class is used to control the hybrid model printers.
The following sequence diagram shows the flow from endorsement printing after MICR reading to slip printing.

Epson ePOS SDK


Operator Application (HybridPrinter class) Printer

SinglePass
Check process start

initWithLang
connect
Preprocess
startMonitor
beginTransaction

readMicrData

Slip sheet Waiting for


onHybdStatusChange slip sheet insertion
insertion start (INSERTION_WAIT_MICR)

Slip sheet
insertion

onHybdStatusChange Slip sheet insertion


Slip sheet (INSERTION_WAIT_NONE) and MICR reading
insertion
onHybdReceive(READMICRDATA)

selectPaperType(ENDORSE)
sendData
Endorsement Endorsement
print print
onHybdReceive(SENDDATA)

selectPaperType(SLIP)
sendData
Slip print
Slip print
onHybdReceive(SENDDATA)

679
Chapter 6 Application Guide - To perform check process

Epson ePOS SDK


Operator Application (HybridPrinter class) Printer

ejectPaper

Slip sheet ejection onHybdReceive(EJECTPAPER) Slip sheet ejection

Remove
slip sheet

onHybdStatusChange
(SLIP_PAPER_EMPTY)

endTransaction

stopMonitor
Postprocess
disconnect

680
Chapter 6 Application Guide - To control multiple peripheral devices

To control multiple peripheral devices


The sequence diagram that controls the printer and customer display is indicated below.

• To connect/disconnect communication with the printer or peripheral devices, call connect API/
disconnect API from one thread to each peripheral device in order.
• The following process can be processed concurrently in one thread.
∗ Displaying data on the customer display
∗ Receipt printing

Application Customer
Printer display
new
Other thread

connect

connect

connected

Processing per payment


new
Other thread

generate print data

sendData

sendData

onDispReceive

onPtrReceive

payed

new
Other thread

disconnect

disconnect

disconnected

681
Chapter 6 Application Guide - To control multiple peripheral devices

To control multiple peripheral devices


The sequence diagram that controls the printer and customer display is indicated below.

• To connect/disconnect communication with the printer or peripheral devices, call connect API/
disconnect API from one thread to each peripheral device in order.
• The following process can be processed concurrently in one thread.
∗ Displaying data on the customer display
∗ Receipt printing

Application Customer
Printer display
new
Other thread

connect

connect

connected

Processing per payment


new
Other thread

generate print data

sendData

sendData

onDispReceive

onPtrReceive

payed

new
Other thread

disconnect

disconnect

disconnected

682
Chapter 6 Application Guide - To update the printer firmware version

To update the printer firmware version


Use the following APIs in the Printer class:
• downloadFirmwareList
• updateFirmware
• verifyUpdate
The sequence diagram of firmware version update is shown below.

Application ePOS SDK Printer

downloadFirmwareList Aquires the firmware list

onFirmwareListDownload

updateFirmware download the firmware image

send the firmware image

onFirmwareUpdate
write the firmware image

reboot

connect
connect

verifyUpdate
verify

onUpdateVerify

683
Appendix - Open Source Software Licensing

Appendix
Open Source Software Licensing
The following open-source software is used in the sample programs and libraries provided by the Epson ePOS
SDK for Android.

Sample Programs

ZXing(https://github.com/zxing/zxing)
ZXing is licensed based on Apache 2.0 license (http://www.apache.org/licenses/LICENSE-2.0.html).

libraries

libxml2
Except where otherwise noted in the source code (e.g. the files hash.c, list.c and the trio files, which are covered
by a similar license but with different Copyright notices) all the files are:
Copyright (C) 1998-2003 Daniel Veillard. All Rights Reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE DANIEL VEILLARD BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of Daniel Veillard shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior written authorization from him.

icu4c
ICU License - ICU 1.8.1 and later
COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1995-2012 International Business Machines Corporation and others

All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the

684
Appendix - Open Source Software Licensing

rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission
notice appear in all copies of the Software and that both the above copyright notice(s) and this permission
notice appear in supporting documentation.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL
DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH
THE USE OR PERFORMANCE OF THIS SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to
promote the sale, use or other dealings in this Software without prior written authorization of the copyright
holder.

zlib
zlib.h -- interface of the 'zlib' general purpose compression library
version 1.2.8, April 28th, 2013

Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held
liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to
alter it and redistribute it freely, subject to the following restrictions:

1. The origin of this software must not be misrepresented; you must not claim that you wrote the original
software. If you use this software in a product, an acknowledgment in the product documentation would be
appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the
original software.
3. This notice may not be removed or altered from any source distribution.

Jean-loup Gailly Mark Adler


jloup@gzip.org madler@alumni.caltech.edu

The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and rfc1952 (gzip format).

685
Appendix - Open Source Software Licensing

LICENSE ISSUES
==============
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts.

OpenSSL License
---------------

/* ====================================================================
* Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR

686
Appendix - Open Source Software Licensing

* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR


* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/

Original SSLeay License


-----------------------

/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)


* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.

687
Appendix - Open Source Software Licensing

* 2. Redistributions in binary form must reproduce the above copyright


* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof ) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

688

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy