Select your printer model
addSymbol method
Adds a 2D symbol print command to the command buffer.
Syntax
addSymbol(data, type, level, width, height, size); |
Parameter
data
String |
Description |
---|---|
String |
Specifies 2D symbol data as a text string. |
Use the following escape sequences to specify binary data which cannot be represented as a string:
String |
Description |
---|---|
\xnn |
Control code (set nn in hexadecimal) |
\\ |
Back slash |
type
Constant |
2D symbol type |
---|---|
SYMBOL_PDF417_STANDARD |
Standard PDF417 |
SYMBOL_PDF417_TRUNCATED |
Truncated PDF417 |
SYMBOL_QRCODE_MODEL_1 |
QR Code Model 1 |
SYMBOL_QRCODE_MODEL_2 |
QR Code Model 2 |
SYMBOL_QRCODE_MICRO |
Micro QR Code |
SYMBOL_MAXICODE_MODE_2 |
MaxiCode Mode 2 |
SYMBOL_MAXICODE_MODE_3 |
MaxiCode Mode 3 |
SYMBOL_MAXICODE_MODE_4 |
MaxiCode Mode 4 |
SYMBOL_MAXICODE_MODE_5 |
MaxiCode Mode 5 |
SYMBOL_MAXICODE_MODE_6 |
MaxiCode Mode 6 |
SYMBOL_GS1_DATABAR_STACKED |
GS1 DataBar Stacked |
SYMBOL_GS1_DATABAR_STACKED_OMNIDIRECTIONAL |
GS1 DataBar Stacked Omnidirectional |
SYMBOL_GS1_DATABAR_EXPANDED_STACKED |
GS1 DataBar Expanded Stacked |
SYMBOL_AZTECCODE_FULLRANGE |
Aztec Code Full-Range mode |
SYMBOL_AZTECCODE_COMPACT |
Aztec Code Compact mode |
SYMBOL_DATAMATRIX_SQUARE |
DataMatrix ECC200 Square |
SYMBOL_DATAMATRIX_RECTANGLE_8 |
DataMatrix ECC200 Rectangle, 8 lines |
SYMBOL_DATAMATRIX_RECTANGLE_12 |
DataMatrix ECC200 Rectangle, 12 lines |
SYMBOL_DATAMATRIX_RECTANGLE_16 |
DataMatrix ECC200 Rectangle, 16 lines |
2D symbol type |
Description |
---|---|
Standard PDF417 |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data. |
Truncated PDF417 |
|
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 |
|
Micro QR Code2 |
|
MaxiCode Mode 2 |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.
For the mode 3, specify the primary message in the following format:
|
MaxiCode Mode 3 |
|
MaxiCode Mode 4 |
|
MaxiCode Mode 5 |
|
MaxiCode Mode 6 |
|
GS1 DataBar Stacked |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data. |
GS1 DataBar Stacked Omnidirectional |
|
GS1 DataBar Expanded Stacked |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the
data.
|
Aztec Code |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the data. |
DataMatrix |
Converts the string into UTF-8, processes the escape sequence(s), and encodes the data. |
level
- PDF417
Constant |
Description |
---|---|
LEVEL_0 |
Error correction level 0 |
LEVEL_1 |
Error correction level 1 |
LEVEL_2 |
Error correction level 2 |
LEVEL_3 |
Error correction level 3 |
LEVEL_4 |
Error correction level 4 |
LEVEL_5 |
Error correction level 5 |
LEVEL_6 |
Error correction level 6 |
LEVEL_7 |
Error correction level 7 |
LEVEL_8 |
Error correction level 8 |
LEVEL_DEFAULT |
Default value (error correction level 1) |
- QR Code
Constant |
Description |
---|---|
LEVEL_L |
Error correction level L |
LEVEL_M |
Error correction level M |
LEVEL_Q |
Error correction level Q |
LEVEL_H |
Error correction level H |
LEVEL_DEFAULT |
Default value (error correction level M) |
- Aztec Code
Constant |
Description |
---|---|
Integer (5 to 95) |
Error correction level |
LEVEL_DEFAULT |
Default value (error correction level 23) |
width
2D symbol type |
Valid value |
Default value |
---|---|---|
PDF417 |
2 to 8 |
3 |
QR Code |
3 to 16 |
3 |
MaxiCode |
Not used |
|
2D GS1 DataBar |
2 to 8 |
2 |
Aztec Code |
2 to 16 |
3 |
DataMatrix |
2 to 16 |
3 |
height
2D symbol type |
Valid value |
Default value |
---|---|---|
PDF417 |
2 to 8 |
3 |
QR Code |
Not used |
|
MaxiCode |
||
2D GS1 DataBar |
||
Aztec Code |
||
DataMatrix |
size
2D symbol type |
Default value |
Description |
|
---|---|---|---|
PDF417 |
0 (auto) |
Specifies the number of code words per stage. |
|
QR Code |
Ignored |
||
MaxiCode |
Ignored |
||
2D GS1 DataBar |
Expanded Stacked |
0 (auto) |
Specifies the maximum width of the 2D symbol (106 or more). |
Other |
Ignored |
||
Aztec Code |
Ignored |
||
DataMatrix |
Ignored |
Return value
Return value |
Object type |
---|---|
Printer object |
Printer |
HybridPrinter2 object |
HybridPrinter2 |
Exception
Exception |
Object type |
---|---|
Parameter " ... " is invalid |
Error |
Supplementary explanation
- Use the addSymbol method at the beginning of a line.
- In the page mode, a 2D symbol is printed at the current print position with the lower-left dot of the 2D symbol as the reference point.
- Specify a string in accordance with the type of the 2D symbol specified in type. The 2D symbol is not printed if the string specified in data does not match the 2D symbol type specified in type.
- Micro QR Code does not support LEVEL_H.
- Specify a constant in accordance with the 2D symbol type specified in type.
- When MaxiCode or 2D GS1 DataBar is specified in data, specify LEVEL_DEFAULT.
Quick Access
- [Name]
- [Format]
- [Range]
- [Description]
- [Notes]
- Introduction
- help
- ePOSDevice object
- Common to device objects
- OtherPeripheral object
- Display object
- createWindow method
- destroyWindow method
- setCurrentWindow method
- clearWindow method
- addCreateScreen method
- addCreateScreenCustom method
- createTextArea method
- destroyTextArea method
- setCurrentTextArea method
- clearTextArea method
- setCursorPosition method
- moveCursorPosition method
- setCursorType method
- addText method
- addReverseText method
- addMarquee method
- setBlink method
- setBrightness method
- addBackgroundColor method
- addStartSlideShow method
- addStopSlideShow method
- addDownloadImage method
- addRegisterDownloadImage method
- addNVImage method
- addClearImage method
- addSymbol method
- addClearSymbol method
- showClock method
- addCommand method
- send method
- reset method
- onreceive event
- Keyboard object
- POSKeyboard object
- MSR object
- Printer object
- addTextAlign method
- addTextLineSpace method
- addTextRotate method
- addText method
- addTextLang method
- addTextFont method
- addTextSmooth method
- addTextDouble method
- addTextSize method
- addTextStyle method
- addTextPosition method
- addTextVPosition method
- addFeedUnit method
- addFeedLine method
- addFeedPosition method
- addFeed method
- addImage method
- addLogo method
- addBarcode method
- addSymbol method
- addHLine method
- addVLineBegin method
- addVLineEnd method
- addPageBegin method
- addPageEnd method
- addPageArea method
- addPageDirection method
- addPagePosition method
- addPageLine method
- addPageRectangle method
- addRotateBegin method
- addRotateEnd method
- addCut method
- addPulse method
- addSound method
- addLayout method
- recover method
- addRecovery method
- reset method
- addReset method
- addCommand method
- send method
- print method
- getPrintJobStatus method
- startMonitor method
- stopMonitor method
- halftone property
- brightness property
- force property
- timeout property
- interval property
- drawerOpenLevel property
- message property
- onreceive event
- onstatuschange event
- onbatterystatuschange event
- ononline event
- onoffline event
- onpoweroff event
- oncoverok event
- oncoveropen event
- onpaperok event
- onpapernearend event
- onpaperend event
- ondrawerclosed event
- ondraweropen event
- onbatteryok event
- onbatterylow event
- HybridPrinter2 object
- lock method
- unlock method
- selectPaperType method
- waitInsertion method
- cancelInsertion method
- ejectPaper method
- sendData method
- print method
- readMicrData method
- cleanMicrReader method
- recover method
- reset method
- startMonitor method
- stopMonitor method
- setMessage method
- getMessage method
- halftone property
- brightness property
- force property
- paperType property
- interval property
- waitTime property
- enable40cplMode property
- onreceive event
- Scanner object
- SimpleSerial object
- GermanyFiscalElement object
- DeviceHubTerminal object
- CommBoxManager object
- CommBox object
- ePosDeviceConfiguration object
- Appendix
- Error Code List
- Key code list
- List of Supported Objects
- List of Supported APIs
- Printer-specific Support Information
- TM-m10
- TM-m30
- TM-m30II
- TM-m30II-H
- TM-m30II-NT
- TM-m30II-S
- TM-m30II-SL
- TM-m30III
- TM-m30III-H
- TM-m50
- TM-m50II
- TM-m50II-H
- TM-T20II
- TM-T20III
- TM-T20IV
- TM-T20IV-SP
- TM-T82III
- TM-T82IV
- TM-T88VI
- TM-T88VII
- TM-L100
- TM-T70
- TM-T70II
- TM-T88IV
- TM-T88V
- TM-U220
- TM-U220II
- TM-U330
- TM-P20
- TM-P20II
- TM-P60II (Receipt)
- TM-P60II (Peeler)
- TM-P80
- TM-P80II
- TM-H6000V
- TM-T20II-i
- TM-T70-i
- TM-T82II-i
- TM-T83II-i
- TM-T88V-i
- TM-T88VI-iHUB
- TM-U220-i
- TM-U220IIB-i
- TM-T70II-DT
- TM-T70II-DT2
- TM-T88V-DT
- TM-T88VI-DT2
- TM-H6000IV-DT
- TM-T20
- TM-T82II
- TM-T83II
- TM-T90
- TM-L90
- TM-H6000IV
- Usage restriction by firmware version