public class DataForSendToPrinterTSC
extends java.lang.Object
构造器和说明 |
---|
DataForSendToPrinterTSC() |
限定符和类型 | 方法和说明 |
---|---|
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)
該指令用來畫一維條螞,共計 23 種
详细注解请查看编程手册 This command prints 1D barcodes. |
static byte[] |
bitmap(int x,
int y,
int mode,
Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
該指令用於在標籤上繪製點陣圖(非 BMP 格式圖檔)
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[] |
checkPrinterStateByPort4000()
此指令使用于4000端口,发一次,打印机返回一次代表状态的数据
|
static byte[] |
checkPrinterStateByPort9100()
This command obtains the printer status at any time, even in the event of printer error.
|
static byte[] |
cls()
該指令用於清除影像緩衝區(image buffer)的資料
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)
該指令用於定義可攜式鍵盤(選配,KP-200)每個字母按鍵所對應的國際字元集
CODEPAGE n |
static byte[] |
country(java.lang.String n)
該指令用於設定可攜式鍵盤(選配,KP-200)LCD 因國 的不同而顯示所需的字元
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 expression,
java.lang.String content)
該指令用來繪製 DataMatrix 二維條碼
DMATRIX x, y, width, height, [xm, row, col], expression |
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 程序文档
DOWNLOAD ”EXAMPLE.BAS” |
static byte[] |
downLoad(java.lang.String filename,
Bitmap bitmap)
Download 图档
DOWNLOAD ”FILENAME.PCX” ,FILE SIZE,DATA CONTENT... |
static byte[] |
downLoad(java.lang.String filename,
int size,
java.lang.String content)
Download 文本文档
DOWNLOAD ”FILENAME” ,DATA SIZE,DATA CONTENT... |
static byte[] |
downLoad(java.lang.String filename,
java.lang.String filepath)
Download 文本文件
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)
該指令用於控制進紙的距離,以點(dot)表示
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)
該指令用於設定打印機進紙時,若經過所設定的長度仍無法偵測到垂直間距,則打印機發生錯誤,停止進紙
LIMITFEED n |
static byte[] |
limitFeedByinch(double n)
該指令用於設定打印機進紙時,若經過所設定的長度仍無法偵測到垂直間距,則打印機發生錯誤,停止進紙
LIMITFEED n |
static byte[] |
limitFeedBymm(double n)
該指令用於設定打印機進紙時,若經過所設定的長度仍無法偵測到垂直間距,則打印機發生錯誤,停止進紙
LIMITFEED n |
static byte[] |
move()
This command moves downloaded files from DRAM to FLASH memory.
|
static byte[] |
offSetBydot(int m)
該指令用於控制在剝離模式時(pee-off mode)每張標籤停止的位置,該指令僅適用於剝離模式。
|
static byte[] |
offSetByinch(double m)
該指令用於控制在剝離模式時(pee-off mode)每張標籤停止的位置,該指令僅適用於剝離模式。
|
static byte[] |
offSetBymm(double m)
該指令用於控制在剝離模式時(pee-off mode)每張標籤停止的位置,該指令僅適用於剝離模式。
|
static byte[] |
pdf417(int x,
int y,
int width,
int height,
int rotate,
java.lang.String option,
java.lang.String content)
該指令用來打印 PDF417 二維條碼
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 void |
setCharsetName(java.lang.String charset)
设置将打印内容传输给打印机所采用的字符编码,默认为中文编码“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)
該指令用於控制蜂鳴器的頻率,可設定 10 階的聲音,每階聲因的長短由第二個參數控制
This command controls the sound frequency of the beeper. |
static byte[] |
speed(double n)
該指令用於控制在剝離模式時(pee-off mode)每張標籤停止的位置,該指令僅適用於剝離模式
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 void setCharsetName(java.lang.String charset)
charset
- 字符编码类型(打印机所能识别的字符编码类型,具体请参考编程手册代码页设置)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 labelsn,The
- offset distance of the gappublic static byte[] gapBymm(double m, double n)
m,The
- gap distance between two labelsn,The
- offset distance of the gappublic static byte[] gapBydot(int m, int n)
m
- The gap distance between two labels,0 ≤ m ≤1 (inch), 0 ≤ m ≤ 25.4 (mm)n
- The offset distance of the gappublic 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 mmn
- The extra label feeding lengthpublic static byte[] blineBymm(double m, double n)
m
- The height of black line either in inch or mmn
- The extra label feeding lengthpublic static byte[] blineBydot(int m, int n)
m
- The height of black line either in inch or mmn
- The extra label feeding lengthpublic static byte[] offSetByinch(double m)
mThe
- offset distance (inch or mm)public static byte[] offSetBymm(double m)
mThe
- offset distance (inch or mm)public static byte[] offSetBydot(int m)
mThe
- offset distance (inch or mm)public static byte[] speed(double n)
n
- Printing speed in inch per second 1public static byte[] density(int n)
n
- 0~15public 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 –203 to 203; for
300 dpi printers, the range is –300 to 300. The unit is dot.public static byte[] country(java.lang.String n)
n
- 001: USApublic static byte[] codePage(java.lang.String n)
n
- 字元集的名字或代表號,可進一步區分為 7-bit 或 8-bitpublic static byte[] cls()
public static byte[] feed(int n)
n
- unit: dotpublic 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
- 可使用英寸或公釐public 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.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.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, Bitmap bitmap, BitmapToByteData.BmpType bmpType)
x
- Specify the x-coordinatey
- Specify the y-coordinatewidth
- Image width (in bytes)height
- Image height (in dots)mode
- Graphic modes listed below:bitmap
- data Bitmap databmpType
- 图片处理类型public 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.thickness
- 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-coordinatey
- Specify the y-coordinaterotation
- 0 : No rotationrow_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 expression, java.lang.String content)
x
- 條碼水平方向啟始位置,以點(dot)表示 y
- 條碼垂直方向啟始位置,以點(dot)表示width
- 條碼寬度,以點(dot)表示height
- 條碼高度,以點(dot)表示xm
- 模組尺寸,以點(dot)表示row
- 條碼列數 Symbol size of row: 10 to 144col
- 條碼欄數 Symbol size of col: 10 to 144expression
- content
- Content of DataMatrix 2D bar codepublic static byte[] dmatrix(int x, int y, int width, int height, java.lang.String expression, java.lang.String content)
public 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 counterclockwiseoption
- 参数请查看编程手册,设置多个以,隔开,例如"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 imagey
- The y-coordinate of the BMP format imagefilename
- The downloaded BMP filenamebpp
- Optional. Bits per pixel of grayscale graphic. Default is 1. *Since V6.91EZ.contrast
- Optional. Contrast of grayscale graphic. Default is 80. Suggested range ispublic static byte[] putBmp(int x, int y, java.lang.String filename)
x
- The x-coordinate of the BMP format imagey
- The y-coordinate of the BMP format imagefilename
- The downloaded BMP filenamebpp
- Optional. Bits per pixel of grayscale graphic. Default is 1. *Since V6.91EZ.contrast
- Optional. Contrast of grayscale graphic. Default is 80. Suggested range ispublic static byte[] putpcx(int x, int y, java.lang.String filename)
x
- The x-coordinate of the BMP format imagey
- The y-coordinate of the BMP format imagefilename
- 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 codey
- The upper left corner y-coordinate of the QR codeeccLevel
- Error correction recovery levelcellWidth
- 1~10mode
- Auto / manual encoderotation
- 0 :model
- M1: (default), original versionmask
- S0~S8, default is S7content
- 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 codey
- The upper left corner y-coordinate of the QR codeeccLevel
- Error correction recovery levelcellWidth
- 1~10mode
- Auto / manual encoderotation
- 0 :model
- M1: (default), original versionmask
- S0~S8, default is S7content
- The encodable character set is described as below,public static byte[] reverse(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)width
- X-axis region width (in dots)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 texty
- The y-coordinate of the textfont
- Font name请参考编程手册rotation
- The rotation angle of textx_multiplication
- Horizontal multiplication, up to 10xy_multiplication
- Vertical multiplication, up to 10xcontent
- 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 texty
- The y-coordinate of the textwidth
- The width of block for the paragraph in dotsheight
- The height of block for the paragraph in dotsfont
- Font namerotation
- The rotation angle of textx_multiplication
- Horizontal multiplication, up to 10xy_multiplication
- Vertical multiplication, up to 10xspace
- Add or delete the space between lines in dot.alignment
- Text alignment. 0 : default (Left);1 : Left;2 : Center; 3 : Rightcontent
- 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 texty
- The y-coordinate of the textwidth
- The width of block for the paragraph in dotsheight
- The height of block for the paragraph in dotsfont
- Font namerotation
- The rotation angle of textx_multiplication
- Horizontal multiplication, up to 10xy_multiplication
- Vertical multiplication, up to 10xspace
- Add or delete the space between lines in dot.alignment
- Text alignment. 0 : default (Left);1 : Left;2 : Center; 3 : Rightcontent
- Data in block. The maximum data length is 4092 bytes.public static byte[] checkPrinterStateByPort9100()
public static byte[] checkPrinterStateByPort4000()
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 memorysize
- 文本大小content
- 字符串content为要存储到打印机的文本内容public 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
- filepath要存储到打印机内存的文本文件的文件路径public static byte[] downLoad(java.lang.String filename, Bitmap bitmap)
filename
- FILENAME The name of data file that will remain resident in the printer memorybitmap
- 要存储到打印机内存的图像文件的bitmap对象,必需是单色图public 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
- 打印机内存中的文件名称