public class DataForSendToPrinterTSC
extends java.lang.Object
Constructor and Description |
---|
DataForSendToPrinterTSC() |
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.
|
public static byte[] sizeBymm(double m, double n)
m
- ,Label width (inch/ mm/ dot)n
- ,Label length (inch/ mm/ dot)public static byte[] sizeByinch(double m, double n)
m
- ,Label width (inch/ mm/ dot)n
- ,Label length (inch/ mm/ dot)public static byte[] sizeBydot(int m, int n)
m
- ,Label width (inch/ mm/ dot)n
- ,Label length (inch/ mm/ dot)public static byte[] gapByinch(double m, double n)
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 firmwaren,The
- offset distance of the gap
n ¡Ü label length (inch or mm)public static byte[] gapBymm(double m, double n)
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 firmwaren,The
- offset distance of the gap
n ¡Ü label length (inch or mm)public static byte[] gapBydot(int m, int n)
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 firmwaren,The
- offset distance of the gap
n ¡Ü label length (inch or mm)public static byte[] gapDetect(int x, int y)
X
- Paper length (in dots)Y
- Gap length (in dots)public static byte[] gapDetect()
X
- Paper length (in dots)Y
- Gap length (in dots)public static byte[] blineDetect(int x, int y)
X
- Paper length (in dots)Y
- Gap length (in dots)public static byte[] autoDetect(int x, int y)
X
- Paper length (in dots)Y
- Gap length (in dots)public static byte[] blineByinch(double m, double n)
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 firmwaren
- The extra label feeding length
0 ¡Ü n ¡Ü label lengthpublic static byte[] blineBymm(double m, double n)
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 firmwaren
- The extra label feeding length
0 ¡Ü n ¡Ü label lengthpublic static byte[] blineBydot(int m, int n)
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 firmwaren
- The extra label feeding length
0 ¡Ü n ¡Ü label lengthpublic static byte[] offSetByinch(double m)
mThe
- offset distance (inch or mm)
-1 ¡Ü m ¡Ü 1 (inch)public static byte[] offSetBymm(double m)
mThe
- offset distance (inch or mm)
-1 ¡Ü m ¡Ü 1 (inch)public static byte[] offSetBydot(int m)
mThe
- offset distance (inch or mm)
-1 ¡Ü m ¡Ü 1 (inch)public static byte[] speed(double n)
n
- Printing speed in inch per secondpublic static byte[] density(int n)
n
- 0~15
0: specifies the lightest level
15: specifies the darkest levelpublic static byte[] direction(int n)
n
- 0 or 1. Please refer to the illustrations belowpublic static byte[] reference(int x, int y)
x
- Horizontal coordinate (in dots)y
- Vertical coordinate (in dots)public static byte[] shift(int n)
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.public static byte[] country(java.lang.String n)
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: Finnishpublic static byte[] codePage(java.lang.String n)
n
- public static byte[] cls()
public static byte[] feed(int n)
n
- unit: dot
1 ¡Ü n ¡Ü 9999public static byte[] backFeed(int n)
n
- unit: dot,1 ¡Ü n ¡Ü 9999public static byte[] formFeed()
public static byte[] home()
public static byte[] print(int m, int n)
m
- Specifies how many sets of labels will be printed.1 ¡Ü m ¡Ü 999999999n
- Specifies how many copies should be printed for each particular label set.1 ¡Ü n ¡Ü 999999999public static byte[] print(int m)
m
- Specifies how many sets of labels will be printed.1 ¡Ü m ¡Ü 999999999n
- Specifies how many copies should be printed for each particular label set.1 ¡Ü n ¡Ü 999999999public static byte[] sound(int level, int interval)
level
- Sound level: 0~9interval
- Sound interval: 1~4095public static byte[] cut()
public static byte[] limitFeedByinch(double n)
n
- inchpublic static byte[] limitFeedBymm(double n)
n
- public static byte[] limitFeedBydot(int n)
n
- public static byte[] selfTest()
public static byte[] selfTest(java.lang.String page)
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.public static byte[] eoj()
public static byte[] delay(int ms)
ms
- The specific period of time. Unit is millisecond. 1000 ms = 1 secondpublic static byte[] disPlay(java.lang.String s)
s
- IMAGE Show the image in printer¡¯s image buffer on LCD panel.
OFF Disable this function.public static byte[] initialPrinter()
public static byte[] bar(int x, int y, int width, int heigth)
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)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)
public static byte[] bitmap(int x, int y, int mode, android.graphics.Bitmap bitmap, BitmapToByteData.BmpType bmpType)
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 datapublic static byte[] box(int x, int y, int x_end, int y_end, int thickness)
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.public static byte[] ellipse(int x, int y, int width, int height, int thickness)
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)public static byte[] codeBlockFMode(int x, int y, int rotation, int row_height, int module_width, java.lang.String content)
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 codepublic static byte[] dmatrix(int x, int y, int width, int height, int xm, int row, int col, java.lang.String content)
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 codepublic static byte[] erase(int x, int y, int width, int height)
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)public static byte[] pdf417(int x, int y, int width, int height, int rotate, java.lang.String option, java.lang.String content)
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 codepublic static byte[] putBmp(int x, int y, java.lang.String filename, int bpp, int contrast)
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.public static byte[] putBmp(int x, int y, java.lang.String filename)
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.public static byte[] putpcx(int x, int y, java.lang.String filename)
x
- The x-coordinate of the BMP format image
y The y-coordinate of the BMP format image
filename The downloaded pcx filenamepublic 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)
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,public static byte[] qrCode(int x, int y, java.lang.String eccLevel, int cellWidth, java.lang.String mode, int rotation, java.lang.String content)
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,public static byte[] reverse(int x, int y, int width, int height)
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)public static byte[] text(int x, int y, java.lang.String font, int rotation, int x_multiplication, int y_multiplication, java.lang.String content)
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 stringpublic 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)
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.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)
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.public static byte[] checkPrinterState()
public static byte[] downLoad(java.lang.String filename)
filename
- FILENAME The name of data file that will remain resident in the printer memorypublic static byte[] downLoad(java.lang.String filename, int size, java.lang.String content)
filename
- FILENAME The name of data file that will remain resident in the printer memorycontent
- contentpublic static byte[] downLoad(java.lang.String filename, java.lang.String filepath)
filename
- FILENAME The name of data file that will remain resident in the printer memoryfilepath
- filepathpublic static byte[] downLoad(java.lang.String filename, android.graphics.Bitmap bitmap, BitmapToByteData.BmpType bmpType)
filename
- FILENAME The name of data file that will remain resident in the printer memorybitmap
- You want to store the image file to the printer memory of the bitmap objectbmpType
- Image processing method of monochromepublic static byte[] eop()
public static byte[] files()
public static byte[] kill(java.lang.String filename)
FILENAME
- The name of data file that will delete in the printer memory (case
sensitive)public static byte[] move()
public static byte[] run(java.lang.String filename)
filename
-