net.posprinter.utils

## Class DataForSendToPrinterTSC

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

-     public class DataForSendToPrinterTSC
      extends java.lang.Object

  This class is instruction processing tool class This type of instruction is only applicable to products of the barcode printer series; for the description and effect of specific instructions, please refer to the programming manual TSC Barcode Printer Instructions TSPL Manual.pdf

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DataForSendToPrinterTSC()`

  - ### Method Summary

    All Methods Static Methods Concrete 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
    `static byte[]` | `checkPrinterStateByPort4000()` This command is used on port 4000, once sent, the printer will return the data representing the status once
    `static byte[]` | `checkPrinterStateByPort9100()` This command obtains the printer status at any time, even in the event of printer error.
    `static byte[]` | `cls()` This command clears printer 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)` This command is used to define the international character set corresponding to each letter key of the portable keyboard (optional, KP-200)
    `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
    `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
    `static byte[]` | `dmatrix(int x, int y, int width, int height, int xm, int row, int col, java.lang.String expression, java.lang.String content)` This command is used to draw DataMatrix two-dimensional barcode
    `static byte[]` | `dmatrix(int x, int y, int width, int height, java.lang.String expression, java.lang.String content)`
    `static byte[]` | `downLoad(java.lang.String filename)` Download program documentation
    `static byte[]` | `downLoad(java.lang.String filename, android.graphics.Bitmap bitmap)` Download imgae
    `static byte[]` | `downLoad(java.lang.String filename, int size, java.lang.String content)` Download text document
    `static byte[]` | `downLoad(java.lang.String filename, java.lang.String filepath)` Download text file
    `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()`
    `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 command is used to set the printer to feed paper.
    `static byte[]` | `limitFeedByinch(double n)` This command is used to set the printer to feed paper.
    `static byte[]` | `limitFeedBymm(double n)` This command is used to set the printer to feed paper.
    `static byte[]` | `move()` This command moves downloaded files from DRAM to FLASH memory.
    `static byte[]` | `offSetBydot(int m)` This command is used to control the stop position of each label in the peel-off mode.
    `static byte[]` | `offSetByinch(double m)` This command is used to control the stop position of each label in the peel-off mode.
    `static byte[]` | `offSetBymm(double m)` This command is used to control the stop position of each label in the peel-off mode.
    `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
    `static byte[]` | `selfTest(java.lang.String page)` At this command, the printer will print out the printer information
    `static void` | `setCharsetName(java.lang.String charset)` Set the character encoding used to transmit the printed content to the printer, the default is the Chinese encoding "gbk"
    `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
    `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

    - #### setCharsetName

          public static void setCharsetName(java.lang.String charset)

      Set the character encoding used to transmit the printed content to the printer, the default is the Chinese encoding "gbk"
      Parameters:
        `charset` -

    - #### sizeBymm

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

      This command defines the label width and length.
      Parameters:
        `m` - Label width (mm)
        `n` - Label height (mm)
      Returns:

    - #### sizeByinch

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

      This command defines the label width and length.
      Parameters:
        `m` - Label width (inch)
        `n` - Label height (inch)
      Returns:

    - #### sizeBydot

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

      This command defines the label width and length.
      Parameters:
        `m` - Label width (dot)
        `n` - Label height (dot)
      Returns:

    - #### gapByinch

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

      Defines the gap distance between two labels.
      Parameters:
        `m` - The gap distance between two labels
        `n` - The offset distance of the gap
      Returns:

    - #### gapBymm

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

      Defines the gap distance between two labels
      Parameters:
        `m` -
        `n` -
      Returns:

    - #### gapBydot

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

      Defines the gap distance between two labels
      Parameters:
        `m` -
        `n` -
      Returns:

    - #### 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)
      Returns:

    - #### gapDetect

          public static byte[] gapDetect()

      Returns:

    - #### 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)
      Returns:

    - #### 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` -
        `y` -
      Returns:

    - #### 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.
      Parameters:
        `m` - The height of black line either in inch or mm
        `n` - The extra label feeding length
      Returns:

    - #### 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.
      Parameters:
        `m` -
        `n` -
      Returns:

    - #### 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.
      Parameters:
        `m` -
        `n` -
      Returns:

    - #### offSetByinch

          public static byte[] offSetByinch(double m)

      This command is used to control the stop position of each label in the peel-off mode. This command is only applicable to the peel-off mode.
      Parameters:
        `m` -
      Returns:

    - #### offSetBymm

          public static byte[] offSetBymm(double m)

      This command is used to control the stop position of each label in the peel-off mode. This command is only applicable to the peel-off mode.
      Parameters:
        `m` -
      Returns:

    - #### offSetBydot

          public static byte[] offSetBydot(int m)

      This command is used to control the stop position of each label in the peel-off mode. This command is only applicable to the peel-off mode.
      Parameters:
        `m` -
      Returns:

    - #### speed

          public static byte[] speed(double n)

      This command defines the print speed
      Parameters:
        `n` - Printing speed in one second
      Returns:

    - #### density

          public static byte[] density(int n)

      This command sets the printing darkness
      Parameters:
        `n` - 0-15
      Returns:

    - #### direction

          public static byte[] direction(int n)

      This command defines the printout direction and mirror image. This will be stored in the printermemory.
      Parameters:
        `n` -
      Returns:

    - #### 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:
      Parameters:
        `x` -
        `y` -
      Returns:

    - #### 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.
      Parameters:
        `n` -
      Returns:

    - #### 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).
      Parameters:
        `n` -
      Returns:

    - #### codePage

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

      This command is used to define the international character set corresponding to each letter key of the portable keyboard (optional, KP-200)
      Parameters:
        `n` -
      Returns:

    - #### cls

          public static byte[] cls()

      This command clears printer buffer.
      Returns:

    - #### feed

          public static byte[] feed(int n)

      This command feeds label with the specified length. The length is specified by dot
      Parameters:
        `n` -
      Returns:

    - #### backFeed

          public static byte[] backFeed(int n)

      This command feeds the label in reverse. The length is specified by dot
      Parameters:
        `n` -
      Returns:

    - #### formFeed

          public static byte[] formFeed()

      This command feeds label to the beginning of next label
      Returns:

    - #### 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.
      Returns:

    - #### print

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

      This command prints the label format currently stored in the image buffer.
      Parameters:
        `m` - Specifies how many sets of labels will be printed.
        `n` - Specifies how many copies should be printed for each particular label set.
      Returns:

    - #### print

          public static byte[] print(int m)

      This command prints the label format currently stored in the image buffer.
      Parameters:
        `m` -
      Returns:

    - #### 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.
      Parameters:
        `level` -
        `interval` -
      Returns:

    - #### cut

          public static byte[] cut()

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

    - #### limitFeedByinch

          public static byte[] limitFeedByinch(double n)

      This command is used to set the printer to feed paper. If the vertical gap cannot be detected after the set length, the printer will cause an error and stop feeding paper
      Parameters:
        `n` -
      Returns:

    - #### limitFeedBymm

          public static byte[] limitFeedBymm(double n)

      This command is used to set the printer to feed paper. If the vertical gap cannot be detected after the set length, the printer will cause an error and stop feeding paper
      Parameters:
        `n` -
      Returns:

    - #### limitFeedBydot

          public static byte[] limitFeedBydot(int n)

      This command is used to set the printer to feed paper. If the vertical gap cannot be detected after the set length, the printer will cause an error and stop feeding paper
      Parameters:
        `n` -
      Returns:

    - #### selfTest

          public static byte[] selfTest()

      At this command, the printer will print out the printer information
      Returns:

    - #### selfTest

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

      At this command, the printer will print out the printer information
      Parameters:
        `page` -
      Returns:

    - #### eoj

          public static byte[] eoj()

      Let the printer wait until process of commands (before EOJ) be finished then go on the next command.
      Returns:

    - #### delay

          public static byte[] delay(int ms)

      Let the printer wait specific period of time then go on next command.
      Parameters:
        `ms` -
      Returns:

    - #### 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
      Parameters:
        `s` - IMAGE Show the image in printer’s image buffer on LCD panel.
      Returns:

    - #### initialPrinter

          public static byte[] initialPrinter()

      This command can restore printer settings to defaults.
      Returns:

    - #### bar

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

      This command draws a bar on the label format.
      Parameters:
        `x` -
        `y` -
        `width` -
        `heigth` -
      Returns:

    - #### 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
      Parameters:
        `x` -
        `y` -
        `codeType` -
        `heigth` -
        `human` -
        `rotation` -
        `narrow` -
        `wide` -
        `content` -
      Returns:

    - #### 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).
      Parameters:
        `x` -
        `y` -
        `mode` -
        `bitmap` -
        `bmpType` -
      Returns:

    - #### box

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

      This command draws rectangles on the labe
      Parameters:
        `x` -
        `y` -
        `x_end` -
        `y_end` -
        `thickness` -
      Returns:

    - #### ellipse

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

      This command draws an ellipse on the label.
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `thickness` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `rotation` -
        `row_height` -
        `module_width` -
        `content` -
      Returns:

    - #### dmatrix

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

      This command is used to draw DataMatrix two-dimensional barcode
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `xm` -
        `row` -
        `col` -
        `expression` -
        `content` -
      Returns:

    - #### dmatrix

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

      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `expression` -
        `content` -
      Returns:

    - #### 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` -
        `y` -
        `width` -
        `height` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `rotate` -
        `option` -
        `content` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `filename` -
        `bpp` -
        `contrast` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `filename` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `filename` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `eccLevel` -
        `cellWidth` -
        `mode` -
        `rotation` -
        `model` -
        `mask` -
        `content` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `eccLevel` -
        `cellWidth` -
        `mode` -
        `rotation` -
        `content` -
      Returns:

    - #### reverse

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

      This command reverses a region in image buffer.
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `font` -
        `rotation` -
        `x_multiplication` -
        `y_multiplication` -
        `content` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `font` -
        `rotation` -
        `x_multiplication` -
        `y_multiplication` -
        `space` -
        `alignment` -
        `content` -
      Returns:

    - #### 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.
      Parameters:
        `x` -
        `y` -
        `width` -
        `height` -
        `font` -
        `rotation` -
        `x_multiplication` -
        `y_multiplication` -
        `content` -
      Returns:

    - #### checkPrinterStateByPort9100

          public static byte[] checkPrinterStateByPort9100()

      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.
      Returns:

    - #### checkPrinterStateByPort4000

          public static byte[] checkPrinterStateByPort4000()

      This command is used on port 4000, once sent, the printer will return the data representing the status once
      Returns:

    - #### downLoad

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

      Download program documentation
      Parameters:
        `filename` -
      Returns:

    - #### downLoad

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

      Download text document
      Parameters:
        `filename` -
        `size` -
        `content` -
      Returns:

    - #### downLoad

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

      Download text file
      Parameters:
        `filename` -
        `filepath` -
      Returns:

    - #### downLoad

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

      Download imgae
      Parameters:
        `filename` -
        `bitmap` -
      Returns:

    - #### 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.
      Returns:

    - #### 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).
      Returns:

    - #### 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.
      Parameters:
        `filename` -
      Returns:

    - #### move

          public static byte[] move()

      This command moves downloaded files from DRAM to FLASH memory.
      Returns:

    - #### 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` -
      Returns: