DataForSendToPrinterTSC

net.xprinter.utils

## Class DataForSendToPrinterTSC

- java.lang.Object
- - net.xprinter.utils.DataForSendToPrinterTSC

-     public class DataForSendToPrinterTSC
      extends java.lang.Object

  As the instruction processing tools. The processing instruction is only applicable to barcode printer series products The effect of specific description and instructions please refer to the programming manual TSC bar code printer instruction manual.Pdf TSPL

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataForSendToPrinterTSC()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static byte[]` | `autoDetect(int x, int y)` This command feeds the paper through the gap/black mark sensor in an effort to determine the paper and gap/black mark sizes, respectively.
    `static byte[]` | `backFeed(int n)` This command feeds the label in reverse.
    `static byte[]` | `bar(int x, int y, int width, int heigth)` This command draws a bar on the label format.
    `static byte[]` | `barCode(int x, int y, java.lang.String codeType, int heigth, int human, int rotation, int narrow, int wide, java.lang.String content)` This command prints 1D barcodes.
    `static byte[]` | `bitmap(int x, int y, int mode, android.graphics.Bitmap bitmap, BitmapToByteData.BmpType bmpType)` This command draws bitmap images (as opposed to BMP graphic files).
    `static byte[]` | `blineBydot(int m, int n)` This command sets the height of the black line and the user-defined extra label feeding length each form feed takes.
    `static byte[]` | `blineByinch(double m, double n)` This command sets the height of the black line and the user-defined extra label feeding length each form feed takes.
    `static byte[]` | `blineBymm(double m, double n)` This command sets the height of the black line and the user-defined extra label feeding length each form feed takes.
    `static byte[]` | `blineDetect(int x, int y)` This command feeds the paper through the black mark sensor in an effort to determine the paper and black mark sizes, respectively.
    `static byte[]` | `block(int x, int y, int width, int height, java.lang.String font, int rotation, int x_multiplication, int y_multiplication, int space, int alignment, java.lang.String content)` This command prints paragraph on label.
    `static byte[]` | `block(int x, int y, int width, int height, java.lang.String font, int rotation, int x_multiplication, int y_multiplication, java.lang.String content)` This command prints paragraph on label.
    `static byte[]` | `box(int x, int y, int x_end, int y_end, int thickness)` This command draws rectangles on the labe BOX x,y,x_end,y_end,line thickness[,radius]
    `static byte[]` | `checkPrinterState()` This command obtains the printer status at any time, even in the event of printer error.
    `static byte[]` | `cls()` This command clears the image buffer.
    `static byte[]` | `codeBlockFMode(int x, int y, int rotation, int row_height, int module_width, java.lang.String content)` This command draws CODABLOCK F mode barcode.
    `static byte[]` | `codePage(java.lang.String n)` select character codepage CODEPAGE n
    `static byte[]` | `country(java.lang.String n)` This command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option).
    `static byte[]` | `cut()` This command activates the cutter to immediately cut the labels without back feeding the label.
    `static byte[]` | `delay(int ms)` Let the printer wait specific period of time then go on next command.
    `static byte[]` | `density(int n)` This command sets the printing darkness DENSITY n
    `static byte[]` | `direction(int n)` This command defines the printout direction and mirror image.
    `static byte[]` | `disPlay(java.lang.String s)` This command can show the image, which is in printer¡¯s image buffer, on LCD panel DISPLAY IMAGE/OFF
    `static byte[]` | `dmatrix(int x, int y, int width, int height, int xm, int row, int col, java.lang.String content)` This command draws DataMatrix barcode DMATRIX x, y, width, height, [xm, row, col], expression
    `static byte[]` | `downLoad(java.lang.String filename)` Download document DOWNLOAD ¡±EXAMPLE.BAS¡±
    `static byte[]` | `downLoad(java.lang.String filename, android.graphics.Bitmap bitmap, BitmapToByteData.BmpType bmpType)` Download image DOWNLOAD ¡±FILENAME.PCX¡± ,FILE SIZE,DATA¡¡CONTENT...
    `static byte[]` | `downLoad(java.lang.String filename, int size, java.lang.String content)` Download text DOWNLOAD ¡±FILENAME¡± ,DATA SIZE,DATA¡¡CONTENT...
    `static byte[]` | `downLoad(java.lang.String filename, java.lang.String filepath)` Download file DOWNLOAD ¡±FILENAME¡± ,FILE SIZE,DATA¡¡CONTENT...
    `static byte[]` | `ellipse(int x, int y, int width, int height, int thickness)` This command draws an ellipse on the label.
    `static byte[]` | `eoj()` Let the printer wait until process of commands (before EOJ) be finished then go on the next command.
    `static byte[]` | `eop()` End of program.
    `static byte[]` | `erase(int x, int y, int width, int height)` This command clears a specified region in the image buffer.
    `static byte[]` | `feed(int n)` This command feeds label with the specified length.
    `static byte[]` | `files()` This command prints out the total memory size, available memory size and files lists (or lists the files through RS-232) in the printer memory (both FLASH memory and DRAM).
    `static byte[]` | `formFeed()` This command feeds label to the beginning of next label
    `static byte[]` | `gapBydot(int m, int n)` Defines the gap distance between two labels.
    `static byte[]` | `gapByinch(double m, double n)` Defines the gap distance between two labels.
    `static byte[]` | `gapBymm(double m, double n)` Defines the gap distance between two labels.
    `static byte[]` | `gapDetect()` This command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes, respectively.
    `static byte[]` | `gapDetect(int x, int y)` This command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes, respectively.
    `static byte[]` | `home()` This command will feed label until the internal sensor has determined the origin.
    `static byte[]` | `initialPrinter()` This command can restore printer settings to defaults.
    `static byte[]` | `kill(java.lang.String filename)` This command deletes a file in the printer memory.
    `static byte[]` | `limitFeedBydot(int n)` This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
    `static byte[]` | `limitFeedByinch(double n)` This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
    `static byte[]` | `limitFeedBymm(double n)` This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
    `static byte[]` | `move()` This command moves downloaded files from DRAM to FLASH memory.
    `static byte[]` | `offSetBydot(int m)` offSet by dot OFFSET m
    `static byte[]` | `offSetByinch(double m)` offset by inch only used for offset model OFFSET m
    `static byte[]` | `offSetBymm(double m)` offSet by mm OFFSET m
    `static byte[]` | `pdf417(int x, int y, int width, int height, int rotate, java.lang.String option, java.lang.String content)` This command defines a PDF417 2D bar code.
    `static byte[]` | `print(int m)` This command prints the label format currently stored in the image buffer.
    `static byte[]` | `print(int m, int n)` This command prints the label format currently stored in the image buffer.
    `static byte[]` | `putBmp(int x, int y, java.lang.String filename)` This command prints BMP format images.
    `static byte[]` | `putBmp(int x, int y, java.lang.String filename, int bpp, int contrast)` This command prints BMP format images.
    `static byte[]` | `putpcx(int x, int y, java.lang.String filename)` This command prints PCX format images.
    `static byte[]` | `qrCode(int x, int y, java.lang.String eccLevel, int cellWidth, java.lang.String mode, int rotation, java.lang.String content)` This command prints QR code.
    `static byte[]` | `qrCode(int x, int y, java.lang.String eccLevel, int cellWidth, java.lang.String mode, int rotation, java.lang.String model, java.lang.String mask, java.lang.String content)` This command prints QR code.
    `static byte[]` | `reference(int x, int y)` This command defines the reference point of the label.
    `static byte[]` | `reverse(int x, int y, int width, int height)` This command reverses a region in image buffer.
    `static byte[]` | `run(java.lang.String filename)` This command executes a program resident in the printer memory.
    `static byte[]` | `selfTest()` At this command, the printer will print out the printer information SELFTEST [page]
    `static byte[]` | `selfTest(java.lang.String page)` At this command, the printer will print out the printer information SELFTEST [page]
    `static byte[]` | `shift(int n)` This command moves the label¡¯s vertical position.
    `static byte[]` | `sizeBydot(int m, int n)` This command defines the label width and length.
    `static byte[]` | `sizeByinch(double m, double n)` This command defines the label width and length.
    `static byte[]` | `sizeBymm(double m, double n)` This command defines the label width and length.
    `static byte[]` | `sound(int level, int interval)` This command controls the sound frequency of the beeper.
    `static byte[]` | `speed(double n)` This command defines the print speed SPEED n
    `static byte[]` | `text(int x, int y, java.lang.String font, int rotation, int x_multiplication, int y_multiplication, java.lang.String content)` This command prints text on label.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### DataForSendToPrinterTSC

          public DataForSendToPrinterTSC()

  - ### Method Detail

    - #### sizeBymm

          public static byte[] sizeBymm(double m,
                        double n)

      This command defines the label width and length. SIZE m mm,n mm
      Parameters:
        `m` - ,Label width (inch/ mm/ dot)
        `n` - ,Label length (inch/ mm/ dot)

    - #### sizeByinch

          public static byte[] sizeByinch(double m,
                          double n)

      This command defines the label width and length. SIZE m,n
      Parameters:
        `m` - ,Label width (inch/ mm/ dot)
        `n` - ,Label length (inch/ mm/ dot)

    - #### sizeBydot

          public static byte[] sizeBydot(int m,
                         int n)

      This command defines the label width and length. SIZE m dot,n dot
      Parameters:
        `m` - ,Label width (inch/ mm/ dot)
        `n` - ,Label length (inch/ mm/ dot)

    - #### gapByinch

          public static byte[] gapByinch(double m,
                         double n)

      Defines the gap distance between two labels. GAP m,n
      Parameters:
        `m,The` - gap distance between two labels 0 ¡Ü m ¡Ü1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n,The` - offset distance of the gap n ¡Ü label length (inch or mm)

    - #### gapBymm

          public static byte[] gapBymm(double m,
                       double n)

      Defines the gap distance between two labels. GAP m,n
      Parameters:
        `m,The` - gap distance between two labels 0 ¡Ü m ¡Ü1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n,The` - offset distance of the gap n ¡Ü label length (inch or mm)

    - #### gapBydot

          public static byte[] gapBydot(int m,
                        int n)

      Defines the gap distance between two labels. GAP m,n
      Parameters:
        `m,The` - gap distance between two labels 0 ¡Ü m ¡Ü1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n,The` - offset distance of the gap n ¡Ü label length (inch or mm)

    - #### gapDetect

          public static byte[] gapDetect(int x,
                         int y)

      This command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes, respectively. This command references the user¡¯s approximate measurements. If the measurements conflict with the actual size, the GAPDETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
      Parameters:
        `X` - Paper length (in dots)
        `Y` - Gap length (in dots)

    - #### gapDetect

          public static byte[] gapDetect()

      This command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes, respectively. This command references the user¡¯s approximate measurements. If the measurements conflict with the actual size, the GAPDETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
      Parameters:
        `X` - Paper length (in dots)
        `Y` - Gap length (in dots)

    - #### blineDetect

          public static byte[] blineDetect(int x,
                           int y)

      This command feeds the paper through the black mark sensor in an effort to determine the paper and black mark sizes, respectively. This command references the user¡¯s approximate measurements. If the measurements conflict with the actual size, the BLINEDETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
      Parameters:
        `X` - Paper length (in dots)
        `Y` - Gap length (in dots)

    - #### autoDetect

          public static byte[] autoDetect(int x,
                          int y)

      This command feeds the paper through the gap/black mark sensor in an effort to determine the paper and gap/black mark sizes, respectively. This command references the user¡¯s approximate measurements. If the measurements conflict with the actual size, the AUTODETECT command will not work properly. This calibration method can be applied to the labels with pre-printed logos or texts.
      Parameters:
        `X` - Paper length (in dots)
        `Y` - Gap length (in dots)

    - #### blineByinch

          public static byte[] blineByinch(double m,
                           double n)

      This command sets the height of the black line and the user-defined extra label feeding length each form feed takes. BLINE m,n
      Parameters:
        `m` - The height of black line either in inch or mm 0 ¡Ü m ¡Ü 1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n` - The extra label feeding length 0 ¡Ü n ¡Ü label length

    - #### blineBymm

          public static byte[] blineBymm(double m,
                         double n)

      This command sets the height of the black line and the user-defined extra label feeding length each form feed takes. BLINE m dot,n dot
      Parameters:
        `m` - The height of black line either in inch or mm 0 ¡Ü m ¡Ü 1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n` - The extra label feeding length 0 ¡Ü n ¡Ü label length

    - #### blineBydot

          public static byte[] blineBydot(int m,
                          int n)

      This command sets the height of the black line and the user-defined extra label feeding length each form feed takes. BLINE m mm,n mm
      Parameters:
        `m` - The height of black line either in inch or mm 0 ¡Ü m ¡Ü 1 (inch), 0 ¡Ü m ¡Ü 25.4 (mm) 0 ¡Ü m ¡Ü5 (inch), 0 ¡Ü m ¡Ü 127 (mm) / since V6.21 EZ and later firmware
        `n` - The extra label feeding length 0 ¡Ü n ¡Ü label length

    - #### offSetByinch

          public static byte[] offSetByinch(double m)

      offset by inch only used for offset model OFFSET m
      Parameters:
        `mThe` - offset distance (inch or mm) -1 ¡Ü m ¡Ü 1 (inch)

    - #### offSetBymm

          public static byte[] offSetBymm(double m)

      offSet by mm OFFSET m
      Parameters:
        `mThe` - offset distance (inch or mm) -1 ¡Ü m ¡Ü 1 (inch)

    - #### offSetBydot

          public static byte[] offSetBydot(int m)

      offSet by dot OFFSET m
      Parameters:
        `mThe` - offset distance (inch or mm) -1 ¡Ü m ¡Ü 1 (inch)

    - #### speed

          public static byte[] speed(double n)

      This command defines the print speed SPEED n
      Parameters:
        `n` - Printing speed in inch per second

    - #### density

          public static byte[] density(int n)

      This command sets the printing darkness DENSITY n
      Parameters:
        `n` - 0~15 0: specifies the lightest level 15: specifies the darkest level

    - #### direction

          public static byte[] direction(int n)

      This command defines the printout direction and mirror image. This will be stored in the printermemory. DIRECTION n[,m]
      Parameters:
        `n` - 0 or 1. Please refer to the illustrations below

    - #### reference

          public static byte[] reference(int x,
                         int y)

      This command defines the reference point of the label. The reference (origin) point varies with the print direction, as shown: REFERENCE x, y
      Parameters:
        `x` - Horizontal coordinate (in dots)
        `y` - Vertical coordinate (in dots)

    - #### shift

          public static byte[] shift(int n)

      This command moves the label¡¯s vertical position. A positive value moves the label further from the printing direction; a negative value moves the label towards the printing direction. For a visual representation, see next page. SHIFT n
      Parameters:
        `n` - The maximum value is 1 inch. For 200 dpi printers, the range is ¨C203 to 203; for 300 dpi printers, the range is ¨C300 to 300. The unit is dot.

    - #### country

          public static byte[] country(java.lang.String n)

      This command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). COUNTRY n
      Parameters:
        `n` - 001: USA 002: Canadian-French 003: Spanish (Latin America) 031: Dutch 032: Belgian 033: French (France) 034: Spanish (Spain) 036: Hungarian 038: Yugoslavian 039: Italian 041: Switzerland 042: Slovak 044: United Kingdom 045: Danish 046: Swedish 047: Norwegian 048: Polish 049: German 055: Brazil 061: English (International) 351: Portuguese 358: Finnish

    - #### codePage

          public static byte[] codePage(java.lang.String n)

      select character codepage CODEPAGE n
      Parameters:
        `n` -

    - #### cls

          public static byte[] cls()

      This command clears the image buffer. CLS

    - #### feed

          public static byte[] feed(int n)

      This command feeds label with the specified length. The length is specified by dot FEED n
      Parameters:
        `n` - unit: dot 1 ¡Ü n ¡Ü 9999

    - #### backFeed

          public static byte[] backFeed(int n)

      This command feeds the label in reverse. The length is specified by dot BACKFEED n
      Parameters:
        `n` - unit: dot,1 ¡Ü n ¡Ü 9999

    - #### formFeed

          public static byte[] formFeed()

      This command feeds label to the beginning of next label

    - #### home

          public static byte[] home()

      This command will feed label until the internal sensor has determined the origin. Size and gap of the label should be defined before using this command. HOME

    - #### print

          public static byte[] print(int m,
                     int n)

      This command prints the label format currently stored in the image buffer. PRINT m [,n]
      Parameters:
        `m` - Specifies how many sets of labels will be printed.1 ¡Ü m ¡Ü 999999999
        `n` - Specifies how many copies should be printed for each particular label set.1 ¡Ü n ¡Ü 999999999

    - #### print

          public static byte[] print(int m)

      This command prints the label format currently stored in the image buffer. PRINT m [,n]
      Parameters:
        `m` - Specifies how many sets of labels will be printed.1 ¡Ü m ¡Ü 999999999
        `n` - Specifies how many copies should be printed for each particular label set.1 ¡Ü n ¡Ü 999999999

    - #### sound

          public static byte[] sound(int level,
                     int interval)

      This command controls the sound frequency of the beeper. There are 10 levels of sounds. The timingcontrol can be set by the ¡°interval¡± parameter. SOUND level,interval
      Parameters:
        `level` - Sound level: 0~9
        `interval` - Sound interval: 1~4095

    - #### cut

          public static byte[] cut()

      This command activates the cutter to immediately cut the labels without back feeding the label. CUT

    - #### limitFeedByinch

          public static byte[] limitFeedByinch(double n)

      This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
      Parameters:
        `n` - inch

    - #### limitFeedBymm

          public static byte[] limitFeedBymm(double n)

      This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
      Parameters:
        `n` -

    - #### limitFeedBydot

          public static byte[] limitFeedBydot(int n)

      This directive is used to set the paper into the printer, if the set length is still unable to detect the vertical distance, the printer error occurs, stop feeding LIMITFEED n
      Parameters:
        `n` -

    - #### selfTest

          public static byte[] selfTest()

      At this command, the printer will print out the printer information SELFTEST [page]

    - #### selfTest

          public static byte[] selfTest(java.lang.String page)

      At this command, the printer will print out the printer information SELFTEST [page]
      Parameters:
        `page` - omitted: Print a self-test page with whole printer information. PATTERN: Print a pattern to check the status of print head heat line. ETHERNET: Print a self-test page with Ethernet settings. WLAN: Print a self-test page with Wi-Fi settings. RS232: Print a self-test page with RS-232 settings. SYSTEM: Print a self-test page with printer settings. Z: Print a self-test page with emulated language settings.

    - #### eoj

          public static byte[] eoj()

      Let the printer wait until process of commands (before EOJ) be finished then go on the next command. EOJ This command has been supported since V6.39 EZ and later firmware.

    - #### delay

          public static byte[] delay(int ms)

      Let the printer wait specific period of time then go on next command. DELAY ms
      Parameters:
        `ms` - The specific period of time. Unit is millisecond. 1000 ms = 1 second

    - #### disPlay

          public static byte[] disPlay(java.lang.String s)

      This command can show the image, which is in printer¡¯s image buffer, on LCD panel DISPLAY IMAGE/OFF
      Parameters:
        `s` - IMAGE Show the image in printer¡¯s image buffer on LCD panel. OFF Disable this function.

    - #### initialPrinter

          public static byte[] initialPrinter()

      This command can restore printer settings to defaults. INITIALPRINTER

    - #### bar

          public static byte[] bar(int x,
                   int y,
                   int width,
                   int heigth)

      This command draws a bar on the label format. BAR x,y,width,height
      Parameters:
        `x` - The upper left corner x-coordinate (in dots)
        `y` - The upper left corner y-coordinate (in dots)
        `width` - Bar width (in dots)
        `height` - Bar height (in dots)

    - #### barCode

          public static byte[] barCode(int x,
                       int y,
                       java.lang.String codeType,
                       int heigth,
                       int human,
                       int rotation,
                       int narrow,
                       int wide,
                       java.lang.String content)

      This command prints 1D barcodes. The available barcodes are listed below: BARCODE X,Y,¡±codetype¡±,height,humanreadable,rotation,narrow,wide,[alignment,]¡±content ¡°

    - #### bitmap

          public static byte[] bitmap(int x,
                      int y,
                      int mode,
                      android.graphics.Bitmap bitmap,
                      BitmapToByteData.BmpType bmpType)

      This command draws bitmap images (as opposed to BMP graphic files). BITMAP X,Y,width,height,mode,bitmap data¡
      Parameters:
        `X` - Specify the x-coordinate Y Specify the y-coordinate width Image width (in bytes) height Image height (in dots) mode Graphic modes listed below: 0: OVERWRITE 1: OR 2: XOR bitmap data Bitmap data

    - #### box

          public static byte[] box(int x,
                   int y,
                   int x_end,
                   int y_end,
                   int thickness)

      This command draws rectangles on the labe BOX x,y,x_end,y_end,line thickness[,radius]
      Parameters:
        `x` - Specify x-coordinate of upper left corner (in dots) y Specify y-coordinate of upper left corner (in dots) x_end Specify x-coordinate of lower right corner (in dots) y_end Specify y-coordinate of lower right corner (in dots) line thickness Line thickness (in dots) radius Optional. Specify the round corner. Default is 0.

    - #### ellipse

          public static byte[] ellipse(int x,
                       int y,
                       int width,
                       int height,
                       int thickness)

      This command draws an ellipse on the label. ELLIPSE x,y,width,height,thickness
      Parameters:
        `x` - Specify x-coordinate of upper left corner (in dots) y Specify y-coordinate of upper left corner (in dots) width Specify the width of the ellipse (in dots) height Specify the height of the ellipse (in dots) thickness Thickness of the ellipse (in dots)

    - #### codeBlockFMode

          public static byte[] codeBlockFMode(int x,
                              int y,
                              int rotation,
                              int row_height,
                              int module_width,
                              java.lang.String content)

      This command draws CODABLOCK F mode barcode. CODABLOCK x,y,rotation,[row height,]module width,]¡±content¡±
      Parameters:
        `x` - Specify the x-coordinate y Specify the y-coordinate rotation 0 : No rotation 90 : Rotate 90 degrees clockwise 180 : Rotate 180 degrees clockwise 270 : Rotate 270 degrees clockwise row height The height of individual row equals to row height x module width (Default is 8) module width Width of narrow element of CODABLOCK in dots (Default is 2) content content of CODABLOCK bar code

    - #### dmatrix

          public static byte[] dmatrix(int x,
                       int y,
                       int width,
                       int height,
                       int xm,
                       int row,
                       int col,
                       java.lang.String content)

      This command draws DataMatrix barcode DMATRIX x, y, width, height, [xm, row, col], expression
      Parameters:
        `x` - Specify the x-coordinate (dot) y £¬Specify the y-coordinate width (dot) height (dot) xm (dot) row Symbol size of row: 10 to 144 col Symbol size of col: 10 to 144 content Content of DataMatrix 2D bar code

    - #### erase

          public static byte[] erase(int x,
                     int y,
                     int width,
                     int height)

      This command clears a specified region in the image buffer.
      Parameters:
        `x` - The x-coordinate of the starting point (in dots) y The y-coordinate of the starting point (in dots) x_width The region width in x-axis direction (in dots) y_height The region height in y-axis direction (in dots)

    - #### pdf417

          public static byte[] pdf417(int x,
                      int y,
                      int width,
                      int height,
                      int rotate,
                      java.lang.String option,
                      java.lang.String content)

      This command defines a PDF417 2D bar code. PDF417 x,y,width,height,rotate,[option],¡±content¡±
      Parameters:
        `x` - X-coordinate of starting point (in dot) y Y-coordinate of starting point (in dot) width Expected width (in dots) height Expected height (in dots) rotate Rotation counterclockwise 0 : No rotation 90 : Rotate 90 degrees 180 : Rotate 180 degrees 270 : Rotate 270 degrees option Please check the parameters programming manual£¬setting many of £¬Please separate by ",", for example:"E4,W4,T1"; content Content of PDF417 2D bar code

    - #### putBmp

          public static byte[] putBmp(int x,
                      int y,
                      java.lang.String filename,
                      int bpp,
                      int contrast)

      This command prints BMP format images. The grayscale printing is for direct thermal mode only. Support 1-bit (monochrome) and 8-bit (256-color) BMP graphic only. PUTBMP x,y,¡±filename¡±[, bpp][, contract]
      Parameters:
        `x` - The x-coordinate of the BMP format image y The y-coordinate of the BMP format image filename The downloaded BMP filename bpp Optional. Bits per pixel of grayscale graphic. Default is 1. *Since V6.91EZ. 1: 1-bit (monochrome) graphic 8: 8-bit (256-color) graphic contrast Optional. Contrast of grayscale graphic. Default is 80. Suggested range is from 60 to 100. *Since V6.91EZ.

    - #### putBmp

          public static byte[] putBmp(int x,
                      int y,
                      java.lang.String filename)

      This command prints BMP format images. The grayscale printing is for direct thermal mode only. Support 1-bit (monochrome) and 8-bit (256-color) BMP graphic only. PUTBMP x,y,¡±filename¡±[, bpp][, contract]
      Parameters:
        `x` - The x-coordinate of the BMP format image y The y-coordinate of the BMP format image filename The downloaded BMP filename bpp Optional. Bits per pixel of grayscale graphic. Default is 1. *Since V6.91EZ. 1: 1-bit (monochrome) graphic 8: 8-bit (256-color) graphic contrast Optional. Contrast of grayscale graphic. Default is 80. Suggested range is from 60 to 100. *Since V6.91EZ.

    - #### putpcx

          public static byte[] putpcx(int x,
                      int y,
                      java.lang.String filename)

      This command prints PCX format images. TSPL language supports 2-color PCX format graphics. TSPL2 language supports 256-color PCX format graphics. PUTPCX x,y,¡±filename¡±
      Parameters:
        `x` - The x-coordinate of the BMP format image y The y-coordinate of the BMP format image filename The downloaded pcx filename

    - #### qrCode

          public static byte[] qrCode(int x,
                      int y,
                      java.lang.String eccLevel,
                      int cellWidth,
                      java.lang.String mode,
                      int rotation,
                      java.lang.String model,
                      java.lang.String mask,
                      java.lang.String content)

      This command prints QR code. QRCODE x,y,ECC Level,cell width,mode,rotation,[model,mask,]¡±content¡±
      Parameters:
        `x` - The upper left corner x-coordinate of the QR code y The upper left corner y-coordinate of the QR code ECC level Error correction recovery level L : 7% M : 15% Q : 25% H : 30% cell width 1~10 mode Auto / manual encode A : Auto M : Manual rotation 0 : 0 degree 90 : 90 degree 180 : 180 degree 270 : 270 degree model M1: (default), original version M2: enhanced version (Almost smart phone is supported by this version.) mask S0~S8, default is S7 content The encodable character set is described as below,

    - #### qrCode

          public static byte[] qrCode(int x,
                      int y,
                      java.lang.String eccLevel,
                      int cellWidth,
                      java.lang.String mode,
                      int rotation,
                      java.lang.String content)

      This command prints QR code. QRCODE x,y,ECC Level,cell width,mode,rotation,[model,mask,]¡±content¡±
      Parameters:
        `x` - The upper left corner x-coordinate of the QR code y The upper left corner y-coordinate of the QR code ECC level Error correction recovery level L : 7% M : 15% Q : 25% H : 30% cell width 1~10 mode Auto / manual encode A : Auto M : Manual rotation 0 : 0 degree 90 : 90 degree 180 : 180 degree 270 : 270 degree model M1: (default), original version M2: enhanced version (Almost smart phone is supported by this version.) mask S0~S8, default is S7 content The encodable character set is described as below,

    - #### reverse

          public static byte[] reverse(int x,
                       int y,
                       int width,
                       int height)

      This command reverses a region in image buffer. REVERSE x_start,y_start,x_width,y_height
      Parameters:
        `x_start` - The x-coordinate of the starting point (in dots) y_start The y-coordinate of the starting point (in dots) x_width X-axis region width (in dots) y_height Y-axis region height (in dots)

    - #### text

          public static byte[] text(int x,
                    int y,
                    java.lang.String font,
                    int rotation,
                    int x_multiplication,
                    int y_multiplication,
                    java.lang.String content)

      This command prints text on label. TEXT x,y,¡±font¡±,rotation,x-multiplication,y-multiplication,¡±content¡±
      Parameters:
        `x` - The x-coordinate of the text y The y-coordinate of the text font Font name please refer to programing manual rotation The rotation angle of text 0 : No rotation 90 : degrees, in clockwise direction 180 : degrees, in clockwise direction 270 : degrees, in clockwise direction x-multiplication Horizontal multiplication, up to 10x y-multiplication Vertical multiplication, up to 10x content Content of text string

    - #### block

          public static byte[] block(int x,
                     int y,
                     int width,
                     int height,
                     java.lang.String font,
                     int rotation,
                     int x_multiplication,
                     int y_multiplication,
                     int space,
                     int alignment,
                     java.lang.String content)

      This command prints paragraph on label. BLOCK x,y,width,height,¡±font¡±,rotation,x-multiplication,y-multiplication,[space,]alignment,]¡°content¡±
      Parameters:
        `x` - The x-coordinate of the text y The y-coordinate of the text width The width of block for the paragraph in dots height The height of block for the paragraph in dots font Font name rotation The rotation angle of text 0 : No rotation 90 : degrees, in clockwise direction 180 : degrees, in clockwise direction 270 : degrees, in clockwise direction x-multiplication Horizontal multiplication, up to 10x y-multiplication Vertical multiplication, up to 10x space Add or delete the space between lines in dot. Alignment Text alignment. 0 : default (Left);1 : Left;2 : Center; 3 : Right content Data in block. The maximum data length is 4092 bytes.

    - #### block

          public static byte[] block(int x,
                     int y,
                     int width,
                     int height,
                     java.lang.String font,
                     int rotation,
                     int x_multiplication,
                     int y_multiplication,
                     java.lang.String content)

      This command prints paragraph on label. BLOCK x,y,width,height,¡±font¡±,rotation,x-multiplication,y-multiplication,¡°content¡±
      Parameters:
        `x` - The x-coordinate of the text y The y-coordinate of the text width The width of block for the paragraph in dots height The height of block for the paragraph in dots font Font name rotation The rotation angle of text 0 : No rotation 90 : degrees, in clockwise direction 180 : degrees, in clockwise direction 270 : degrees, in clockwise direction x-multiplication Horizontal multiplication, up to 10x y-multiplication Vertical multiplication, up to 10x space Add or delete the space between lines in dot. Alignment Text alignment. 0 : default (Left);1 : Left;2 : Center; 3 : Right content Data in block. The maximum data length is 4092 bytes.

    - #### checkPrinterState

          public static byte[] checkPrinterState()

      This command obtains the printer status at any time, even in the event of printer error. An inquiry request is solicited by sending an (ASCII 27, escape character) as the beginning control character to the printer. A one byte character is returned, flagging the printer status. A 0 signifies the printer is ready to print labels. !?

    - #### downLoad

          public static byte[] downLoad(java.lang.String filename)

      Download document DOWNLOAD ¡±EXAMPLE.BAS¡±
      Parameters:
        `filename` - FILENAME The name of data file that will remain resident in the printer memory

    - #### downLoad

          public static byte[] downLoad(java.lang.String filename,
                        int size,
                        java.lang.String content)

      Download text DOWNLOAD ¡±FILENAME¡± ,DATA SIZE,DATA¡¡CONTENT...
      Parameters:
        `filename` - FILENAME The name of data file that will remain resident in the printer memory
        `content` - content

    - #### downLoad

          public static byte[] downLoad(java.lang.String filename,
                        java.lang.String filepath)

      Download file DOWNLOAD ¡±FILENAME¡± ,FILE SIZE,DATA¡¡CONTENT...
      Parameters:
        `filename` - FILENAME The name of data file that will remain resident in the printer memory
        `filepath` - filepath

    - #### downLoad

          public static byte[] downLoad(java.lang.String filename,
                        android.graphics.Bitmap bitmap,
                        BitmapToByteData.BmpType bmpType)

      Download image DOWNLOAD ¡±FILENAME.PCX¡± ,FILE SIZE,DATA¡¡CONTENT...
      Parameters:
        `filename` - FILENAME The name of data file that will remain resident in the printer memory
        `bitmap` - You want to store the image file to the printer memory of the bitmap object
        `bmpType` - Image processing method of monochrome

    - #### eop

          public static byte[] eop()

      End of program. To declare the start and end of BASIC language commands used in a program, DOWNLOAD ¡°FILENAME.BAS ¡° must be added in the first line of the program, and ¡°EOP ¡° statement at the last line of program. EOP

    - #### files

          public static byte[] files()

      This command prints out the total memory size, available memory size and files lists (or lists the files through RS-232) in the printer memory (both FLASH memory and DRAM). FILES

    - #### kill

          public static byte[] kill(java.lang.String filename)

      This command deletes a file in the printer memory. The wild card (*) will delete all files resident in specified DRAM or FLASH memory. KILL ¡±FILENAME¡±
      Parameters:
        `FILENAME` - The name of data file that will delete in the printer memory (case sensitive)

    - #### move

          public static byte[] move()

      This command moves downloaded files from DRAM to FLASH memory. MOVE

    - #### run

          public static byte[] run(java.lang.String filename)

      This command executes a program resident in the printer memory. It is available for TSPL2 language printers only. RUN ¡°FILENAME.BAS¡± This command can be replaced to filename that without typing ¡°.BAS¡±.
      Parameters:
        `filename` -