Global

Methods

addBackFeed(backup)

该指令用于将标签纸向后回拉指定的长度
Parameters:
Name Type Description
backup * 点数dots
Source:
Returns:

addBar(x, y, width, height)

该指令用于在标签上画线
Parameters:
Name Type Description
x * 线条左上角X 坐标,单位dots
y * 线条左上角Y 坐标,单位dots
width * 线宽,单位dots
height * 线高,单位dots
Source:
Returns:

addBarCode(x, y, codetype, height, readable, rotation, content)

该指令用来画一维条码 CODE128("128"),CODE128M("128M"),EAN128("EAN128"),ITF25("25"),ITF25C("25C"), CODE39("39"),CODE39C("39C"),CODE39S("39S"), CODE93("93"),EAN13("EAN13"),EAN13_2("EAN13+2"),EAN13_5("EAN13+5"),EAN8("EAN8"), EAN8_2("EAN8+2"),EAN8_5("EAN8+5"),CODABAR("CODA"),POST("POST"),UPCA("UPCA"), UPCA_2("UPCA+2"),UPCA_5("UPCA+5"),UPCE("UPCE13"),UPCE_2("UPCE13+2"),UPCE_5("UPCE13+5"), CPOST("CPOST"),MSI("MSI"), MSIC("MSIC"),PLESSEY("PLESSEY"),ITF14("ITF14"),EAN14("EAN14")
Parameters:
Name Type Description
x * 左上角水平坐标起点,以点(dot)表示
y * 左上角垂直坐标起点,以点(dot)表示
codetype * 条码类型
height * 条形码高度,以点(dot)表示
readable * 0 表示人眼不可识,1 表示人眼可识
rotation * 条形码旋转角度,顺时针方向 0,90,180,270
content * 打印内容
Source:
Returns:

addBox(x_start, y_start, x_end, y_end, thickness)

该指令用于在卷标上绘制矩形方框
Parameters:
Name Type Description
x_start * 方框左上角X 坐标,单位dots
y_start * 方框左上角Y 坐标,单位dots
x_end * 方框右下角X 坐标,单位dots
y_end * 方框右下角Y 坐标,单位dots
thickness * 方框线宽,单位dots
Source:
Returns:

addCls()

该指令用于清除图像缓冲区(image buffer)的数据
Source:
Returns:

addCodepage(codepage)

该指令用于选择对应的国际字符集 8-bit codepage 字符集代表 437:United States 850:Multilingual 852:Slavic 860:Portuguese 863:Canadian/French 865:Nordic Windows code page 1250:Central Europe 1252:Latin I 1253:Greek 1254:Turkish
Parameters:
Name Type Description
codepage *
Source:
Returns:

addCut(n)

此命令用于设置切刀状态,关闭打印机电源后,该设置将会被存储在打印机内存中
Parameters:
Name Type Description
n * 1 启用此功能 0 禁止此功能
Source:
Returns:

addCut(n)

开启带Response的打印,用于连续打印
Parameters:
Name Type Description
n * ON, OFF, BATCH
Source:
Returns:

addCutterPieces(pieces)

在PRINT 命令结束后切纸
Parameters:
Name Type Description
pieces * pieces 0-65535,用于设置每几个标签进行切纸
Source:
Returns:

addDensity(printDensity)

该指令用于控制打印时的浓度
Parameters:
Name Type Description
printDensity * 0<=printDensity<=15
Source:
Returns:

addDirection(direction, mirror)

该指令用于定义打印时出纸和打印字体的方向
Parameters:
Name Type Description
direction * 0(横向)和1(纵向)
mirror * 0(正常)和1(镜像)
Source:
Returns:

addErase(x_start, y_start, x_width, y_height)

该指令用于清除影像缓冲区部分区域的数据
Parameters:
Name Type Description
x_start * 反相区域左上角X 坐标,单位dot
y_start * 反相区域左上角Y 坐标,单位dot
x_width * 反相区域宽度,单位dot
y_height * 反相区域高度,单位dot
Source:
Returns:

addFeed(feed)

该指令用于将标签纸向前推送指定的长度 打印机分辨率200 DPI:1 mm = 8 dots 打印机分辨率300 DPI:1 mm = 12 dots
Parameters:
Name Type Description
feed * 点数dots
Source:
Returns:

addFromfeed()

该指令用于控制打印机进一张标签纸
Source:
Returns:

addGap(printGap)

该指令用于定义两张卷标纸间的垂直间距距离
Parameters:
Name Type Description
printGap * 标签间隙 单位mm
Source:
Returns:

addHome()

在使用含有间隙或黑标的标签纸时,若不能确定第一张标签纸是否在正确打印位 置时,此指令可将标签纸向前推送至下一张标签纸的起点开始打印。标签尺寸和 间隙需要在本条指令前设置 注:使用该指令时,纸张高度大于或等于30 mm
Source:
Returns:

addLimitfeed(limit)

该指令用于设定打印机进纸时,若经过所设定的长度仍无法侦测到垂直间距,则打印机在连续纸模式工作
Parameters:
Name Type Description
limit * 检测垂直间距 点数dots
Source:
Returns:

addOffset(offset)

该指令用于控制在剥离模式时(peel-off mode)每张卷标停止的位置,在打印 下一张时打印机会将原先多推出或少推出的部分以回拉方式补偿回来。该指令仅 适用于剥离模式。
Parameters:
Name Type Description
offset * 纸张停止的距离 单位mm
Source:
Returns:

addPagePrint()

该指令用于打印出存储于影像缓冲区内的数据
Source:
Returns:

addPeel(n)

该指令用来启动/关闭剥离模式,默认值为关闭
Parameters:
Name Type Description
n * 1 起动剥离模式 0 关闭剥离模式
Source:
Returns:

addPrint(page, n)

该指令用于打印出存储于影像缓冲区内的数据
Parameters:
Name Type Description
page * 打印份数
n *
Source:
Returns:

addQRCode(x, y, level, width, rotation, content)

该指令用来打印二维码
Parameters:
Name Type Description
x * 二维码水平方向起始点坐标
y * 二维码垂直方向起始点坐标
level * ECC level 选择QRCODE 纠错等级 L 7% M 15% Q 25% H 30%
width * cell width 二维码宽度1-10
rotation * 旋转角度(顺时针方向) 0,90,180,270
content * 内容
Source:
Returns:

addReference(x, y)

该指令用于定义卷标的参考坐标原点。坐标原点位置和打印方向有关 打印机分辨率200 DPI: 1 mm = 8 dots 打印机分辨率300 DPI: 1 mm = 12 dots
Parameters:
Name Type Description
x * 水平方向的坐标位置,单位dots
y * 垂直方向的坐标位置,单位dots
Source:
Returns:

addReprint(n)

此命令将禁用/启用标签机在无纸或开盖错误发生后,上纸或合盖后重新打印一次标签内容
Parameters:
Name Type Description
n * 1 启用此功能 0 禁止此功能
Source:
Returns:

addReverse(x_start, y_start, x_width, y_height)

将指定的区域反相打印
Parameters:
Name Type Description
x_start * 反相区域左上角X 坐标,单位dot
y_start * 反相区域左上角Y 坐标,单位dot
x_width * 反相区域宽度,单位dot
y_height * 反相区域高度,单位dot
Source:
Returns:

addSelfTest()

打印自检页
Source:
Returns:

addShift(n)

该指令表示标签打印偏移量多少设置 打印机分辨率200 DPI: 1 mm = 8 dots 打印机分辨率300 DPI: 1 mm = 12 dots
Parameters:
Name Type Description
n * 偏移量 ,单位dot 1mm=8 dots
Source:
Returns:

addSize(pageWidth, pageHeight)

该指令用于设定卷标纸的宽度和长度
Parameters:
Name Type Description
pageWidth * 标签宽度 单位mm
pageHeight * 标签高度 单位mm
Source:
Returns:

addSound(level, interval)

该指令用于控制蜂鸣器的频率,可设定10 阶的声音,每阶声音的长短由第二个参数控制
Parameters:
Name Type Description
level * 音阶:0-9
interval * 间隔时间:1-4095
Source:
Returns:

addSpeed(printSpeed)

该指令用于控制打印速度
Parameters:
Name Type Description
printSpeed * 1<=printSpeed<=4 实际支持速度以自检页为准
Source:
Returns:

addTear(n)

此命令是用来启用/禁用撕纸位置走到撕纸处,此设置关掉电源后将保存在打印机内
Parameters:
Name Type Description
n * 1 启用撕纸位置走到撕纸处 0 禁用撕纸位置走到撕纸处,命令在起始位置有效
Source:
Returns:

addText(x, y, font, rotation, x_, y_, str)

该指令用于打印字符串
Parameters:
Name Type Description
x * 文字X 方向起始点坐标
y * 文字Y 方向起始点坐标
font * 字体名称 1 8×12 dot 英数字体 2 12×20 dot 英数字体 3 16×24 dot 英数字体 4 24×32 dot 英数字体 5 32×48 dot 英数字体 6 14×19 dot 英数字体OCR-B 7 21×27 dot 英数字体OCR-B 8 14×25 dot 英数字体OCR-A 9 9×17 dot 英数字体 10 12×24 dot 英数字体 TSS16.BF2 简体中文16×16(GB 码) TSS20.BF2 简体中文20×20(GB 码) TST24.BF2 繁体中文24×24(大五码) TSS24.BF2 简体中文24×24(GB 码) K 韩文24×24Font(KS 码) TSS32.BF2 简体中文32×32(GB 码)
rotation * 文字旋转角度(顺时针方向) 0, 90, 180, 270
x_ *
y_ *
str * 内容
Source:
Returns:

closeConnect(success, error)

关闭连接
Parameters:
Name Type Description
success *
error *
Source:

connectDevice(address, success, error)

连接打印机
Parameters:
Name Type Description
address *
success *
error *
Source:

createTsc(index)

创建标签打印指令(打印标签的第一步)
Parameters:
Name Type Description
index *
Source:
Returns:

getPairedDevices(success, error)

获取已配对的蓝牙设备
Parameters:
Name Type Description
success *
error *
Source:

initialize(params, success, error)

初始化蓝牙
Parameters:
Name Type Description
params * {request: true}
success *
error *
Source:

isOpenStatus(}, error)

判断蓝牙打印机是否连接
Parameters:
Name Type Description
} * success (open/close)
error *
Source:

print(success, error, index)

打印,执行打印指令集,打印最后一步
Parameters:
Name Type Description
success *
error *
index * 打印次数
Source:

printTest(success, error)

打印测试
Parameters:
Name Type Description
success *
error *
Source:

printWithCount(success, error)

打印,执行打印指令集,打印最后一步
Parameters:
Name Type Description
success *
error *
Source: