提供对 TSC 打印语言 (TSPL) 表单/标签创建的支持。 更多...
Public 成员函数 | |
TsplForm (String formName) | |
创建具有指定名称的表单。 | |
void | AddTsplObject (Object tsplObject) |
添加可以转换为 TSPL 语法的对象。 | |
void | Barcode_1D (Barcode_1D_Properties bcdSetup, int startRow, int startCol, String bcdData) |
使用传入的非默认设置添加 1D 条码 | |
void | Barcode_1D (TSPL.Barcode_Type1D bcdType, int startRow, int startCol, String bcdData) |
使用默认条码设置添加 1D 条码 | |
void | Barcode_2D (Barcode_2D_Properties bcdSetup, int startRow, int startCol, String bcdData) |
使用传入的非默认设置添加 2D 条码 | |
void | Barcode_2D (TSPL.Barcode_Type2D bcdType, int startRow, int startCol, String bcdData) |
使用默认条码设置添加 2D 条码 | |
void | Box (int lineThickness, int startRow, int startCol, int endRow, int endCol) |
添加方框。 更多... | |
String | GetName () |
更改表单名称。 | |
boolean | IsDeleteAfterUse () |
不支持 | |
void | Line (int lineThickness, int startRow, int startCol, int endRow, int endCol) |
添加线条:垂直、水平、对角线 更多... | |
void | RawContent (String rawContent) |
在需要添加自定义内容的情况下,将原始内容添加到表单中。 更多... | |
void | Rfid_Verify (Rfid_ReadProperties readProps, Rfid_ReadBitField readBitField) |
读取并发送内容回主机。 更多... | |
void | Rfid_Write (Rfid_WriteProperties writeProps, Rfid_WriteBitField bitField) |
用于仅写入一个位字段的情况。 | |
void | Rfid_Write (TSPL.Rfid_MemBlock memBank, TSPL.Rfid_Format dataFormat, int bitCount, String data) |
用于简单写入仅一个位字段的情况。 | |
void | Scale (TSPL.SCALE_UNITS units, int horzRes, int vertRes) |
更改用于表单内对象定位的比例。 更多... | |
void | SetDeleteAfterUse (boolean deleteAfterUse) |
void | SetName (String name) |
void | Text (int startRow, int startCol, int vertExpand, int horzExpand, String data) |
添加文字 更多... | |
String | toString () |
提供对 TSC 打印语言 (TSPL) 表单/标签创建的支持。
注意,在定位对象时,表单/标签的原点位于左上角。 这意味着在定位对象时,以行(垂直)和列(水平)的方式,当行数增加时,对象在表单/标签内向下移动;当列数增加时,对象向右移动。
void Box | ( | int | lineThickness, |
int | startRow, | ||
int | startCol, | ||
int | endRow, | ||
int | endCol | ||
) |
添加方框。
起始/结束位置相对于表单/标签的原点,即左上角。
void Line | ( | int | lineThickness, |
int | startRow, | ||
int | startCol, | ||
int | endRow, | ||
int | endCol | ||
) |
添加线条:垂直、水平、对角线
起始/结束位置相对于表单/标签的原点,即左上角。 垂直线:起始列 = 结束列 水平线:起始行 = 结束行 对角线:起始列 != 结束列,起始行 != 结束行
void RawContent | ( | String | rawContent | ) |
在需要添加自定义内容的情况下,将原始内容添加到表单中。
添加原始内容允许添加 PGL 命令或其他可能不可用的功能。 不会对内容进行格式化。调用者需确保内容符合 PGL 语法。
void Rfid_Verify | ( | Rfid_ReadProperties | readProps, |
Rfid_ReadBitField | readBitField | ||
) |
读取并发送内容回主机。
必须将印表机配置为将数据发送回主机。而且,主机必须在适当的通信端口监听印表机发送的数据。 例如,状态端口 3002,或管理端口 3007,或数据端口。
void Scale | ( | TSPL.SCALE_UNITS | units, |
int | horzRes, | ||
int | vertRes | ||
) |
更改用于表单内对象定位的比例。
注意,虽然可以改变比例以使对象定位更容易,但不会影响对象的打印。 默认比例为水平 300 dpi,垂直 300 dpi。
void Text | ( | int | startRow, |
int | startCol, | ||
int | vertExpand, | ||
int | horzExpand, | ||
String | data | ||
) |
添加文字
起始/结束位置相对于表单/标签的原点,即左上角。 垂直和水平的扩展用于调整文字的高度/宽度。 0 值表示不扩展。