TSPL SDK 完整索引
本索引按语言收录固定版本中该模块的全部命令参数源文件和枚举。EMAPI 收录命令工厂、载荷、会话和编解码入口;C 收录兼容接口。展开查看参数声明摘录,通过固定版本源码链接核对完整默认值、条件分支和序列化。标题中的命令头预览来自源码字面量,不是完整的指令格式。
声明保留实现中已有的差异。收录表示存在对应实现,不表示所有打印机都支持。发送前请查阅兼容性与验证。
源文件数: 354.
tautodot.dart — SETC AUTODOTTED
class TAutoDot extends BasicTSPLArg<TAutoDot> { late bool _enable; //虚化 横向实线变成虚线 TAutoDot({required bool enable}) { String header() {tbar.dart — BAR
class TBar extends BasicTSPLArg<TBar> { late int _x; late int _y; late int _width; late int _height; late TLineType _line ; TBar({ required int x, required int y, required int width, required int height, TLineType line= TLineType.solidLine, }) { String header() {tbarcode.dart — BARCODE
class TBarCode extends BasicTSPLArg<TBarCode> { late int _x; //起始x坐标 late int _y; //起始y坐标 late TCodeType _codeType; //条码类型 late int _height; //条码高度 late TShowType _showType; //显示方式 late TRotation _rotation; //旋转角度 late int _cellwidth; //单元宽度 late String _content; //内容 TBarCode({ required int x, required int y, TCodeType codeType = TCodeType.code128, required int height, TShowType showType = TShowType.noShow, TRotation rotation = TRotation.rotation_0, required int cellwidth, required String content, }) { String header() {tbline.dart — BLINE
class TBline extends BasicTSPLArg<TBline> { late int _height; late int _offset; TBline({ int height= 3, int offset = 0, }) { String header() {tbox.dart — BOX
class TBox extends BasicTSPLArg<TBox> { late int _startX; //起始x坐标 late int _startY; //起始y坐标 late int _endX; //结束y坐标 late int _endY; //结束y坐标 late int _width; //线宽 late int _radius; //圆角半径 TBox({ required int startX, required int startY, required int endX, required int endY, required int width, required int radius, }) { String header() {tcircle.dart — CIRCLE
class TCircle extends BasicTSPLArg<TCircle> { late int _x; //起始x坐标 late int _y; //起始y坐标 late int _width; //线宽 late int _radius; //半径 TCircle( {required int x, required int y, required int width, required int radius}) { String header() {tcleanbmpflash.dart — BMPDELETE
class TCleanBmpFlash extends BasicTSPLArg<TCleanBmpFlash> { late int _index; TCleanBmpFlash({ required int index, }) { String header() {tcontinuous.dart — GAP
class TContinuous extends BasicTSPLArg<TContinuous> { late int _height; late int _offset; TContinuous({ int height= 0, int offset = 0, }) { String header() {tcut.dart — SET CUTTER
class TCut extends BasicTSPLArg<TCut> { late bool _enable; //是否使能切刀 TCut({required bool enable}) { String header() {tdensity.dart — DENSITY
class TDensity extends BasicTSPLArg<TDensity> { late int _density; //浓度 TDensity({ required int density, }) { String header() {tdirection.dart — DIRECTION
class TDirection extends BasicTSPLArg<TDirection> { late Direction _direction; late Mirror _mirror; TDirection({ Direction directory = Direction.upOut, Mirror mirror = Mirror.noMirror, }) { String header() {enum Direction { int getDirection() {enum Mirror { int getMirror() {tdmatrix.dart — DMATRIX
class TDmatrix extends BasicTSPLArg<TDmatrix> { late int _x; //起始x坐标 late int _y; //起始y坐标 late int _width; //条码宽度 late int _height; //条码高度 late String _content; //条码内容 TDmatrix({ required int x, required int y, required int width, required int height, required String content, }) { String header() {tellipse.dart — ELLIPSE
class TEllipse extends BasicTSPLArg<TEllipse> { late int _x; //起始x坐标 late int _y; //起始y坐标 late int _width; //椭圆形宽 late int _height; //椭圆形高 late int _thickness; //椭圆形框的宽度 TEllipse( {required int x, required int y, required int width, required int height, required int thickness}) { String header() {tgap.dart — SET GAP
class TGap extends BasicTSPLArg<TGap> { late bool _enable; //是否定位到缝隙 TGap({required bool enable}) { String header() {tgetribbonend.dart — DIAGNOSTIC REPORT RIBBONEND
class TGetRibbonEnd extends OnlyTextHeaderArg<TGetRibbonEnd> {timage.dart — BITMAP
class TImage extends BasicTSPLArg<TImage> { late int _x; late int _y; late List<int> _image; late bool _compress; late bool _reverse; late TImageMode _mode; late int _smoothWeight; late ThresholdEdgeDitherMode? _edgeDitherMode; late ThresholdEdgeDitherDepth _edgeDitherDepth; TImage({ required int x, required int y, required List<int> image, bool compress = false, bool reverse = false, TImageMode imageMode = TImageMode.overwrite, int? threshold, int smoothWeight = 0, ThresholdEdgeDitherMode? edgeDitherMode, ThresholdEdgeDitherDepth edgeDitherDepth = ThresholdEdgeDitherDepth.shallow, }) { String header() {tlabel.dart — GAP
class TLabel extends BasicTSPLArg<TLabel> { late int _height; late int _offset; TLabel({ int height= 3, int offset = 0, }) { String header() {tlearnpapergap.dart — GAPDETECT
class TLearnPaperGap extends OnlyTextHeaderArg<TLearnPaperGap> {tline.dart — LINE
class TLine extends BasicTSPLArg<TLine> { late int _startX; //起始x坐标 late int _startY; //起始y坐标 late int _endX; //结束y坐标 late int _endY; //结束y坐标 late int _width; //线宽 late TLineM _line ; TLine({ required int startX, required int startY, required int endX, required int endY, required int width, TLineM line= TLineM.solidLine, }) { String header() {tmodels.dart — OUT GETSETTING$(\ / ,\ / )
class TModels extends OnlyTextHeaderArg<TModels> {toffset.dart — OFFSET
class TOffset extends BasicTSPLArg<TOffset> { late int _offset; TOffset({ int offset = 0, }) { String header() {tpage.dart — SIZE
class TPage extends BasicTSPLArg<TPage> { late int _width; late int _height; TPage({ required int width, required int height, }) { String header() {tpeel.dart — SET PEEL
class TPeel extends BasicTSPLArg<TPeel> { late bool _enable; TPeel({ bool enable = true, }) { String header() {tprint.dart — PRINT
class TPrint extends BasicTSPLArg<TPrint> { late int _copies; TPrint({ required int copies, }) { String header() {tputimage.dart — PUTBMP
class TPutImage extends BasicTSPLArg<TPutImage> { late int _x; //起始x坐标 late int _y; //起始y坐标 late String _filename; //图片文件名 TPutImage({ required int x, required int y, required String filename, }) { String header() {tqrcode.dart — QRCODE
class TQRCode extends BasicTSPLArg<TQRCode> { late int _x; //起始x坐标 late int _y; //起始y坐标 late TCorrectLevel _correctLevel; //条码类型 late TRotation _rotation; //旋转角度 late int _cellWidth; //单元宽度 late String _content; //内容 late String _version; TQRCode({ required int x, required int y, TCorrectLevel correctLevel = TCorrectLevel.l, TRotation rotation = TRotation.rotation_0, required int cellWidth, required String content, required String version, }) { String header() {treadhardwareversion.dart — READC HW_VERSION
class TReadHardwareVersion extends OnlyTextHeaderArg<TReadHardwareVersion> {tred.dart — SETCOLOR RED
class TRed extends BasicTSPLArg<TRed> { late int _density; //浓度 TRed({ required int density, }) { String header() {treference.dart — REFERENCE
class TReference extends BasicTSPLArg<TReference> { late int _horizontal; late int _vertical; TReference({ int horizontal= 0, int vertical = 0, }) { String header() {tresetfactory.dart — RESET FACTORY
class TResetFactory extends OnlyTextHeaderArg<TResetFactory> {treverse.dart — REVERSE
class TReverse extends BasicTSPLArg<TReverse> { late int _x; //起始x坐标 late int _y; //起始y坐标 late int _height; late int _width; TReverse({ required int x, required int y, required int height, required int width, }) { String header() {tribbon.dart — SET RIBBON
class TRibbon extends BasicTSPLArg<TRibbon> { late bool _enable; TRibbon({ bool enable = false, }) { String header() {tsetribbonend.dart — SET RIBBONEND
class TSetRibbonEnd extends BasicTSPLArg<TSetRibbonEnd> { late bool _enable; TSetRibbonEnd({required bool enable}) { String header() {tshift.dart — SHIFT
class TShift extends BasicTSPLArg<TShift> { late int _shift; TShift({ int shift = 0, }) { String header() {tspeed.dart — SPEED
class TSpeed extends BasicTSPLArg<TSpeed> { late int _speed; //速度 TSpeed({ required int speed, }) { String header() {tstatus.dart — 1B 21 3F
class TStatus extends OnlyBinaryHeaderArg<TStatus> { bool newline() {ttear.dart — SET TEAR
class TTear extends BasicTSPLArg<TTear> { late bool _tear; TTear({ bool tear = true, }) { String header() {ttext.dart — TEXT
class TText extends BasicTSPLArg<TText> { late int _x; //起始x坐标 late int _y; //起始y坐标 late TFont _font; //字体 late TRotation _rotation; //旋转角度:可选参数 0,90,180,270 late int _xmulti = 1; //横向放大倍数 late int _ymulti = 1; //纵向放大倍数 late bool _isBold; //是否加粗 late TAlignment _alignment; //对齐方式 late String _content; //内容 TText({ required int x, required int y, TFont font = TFont.tss16, String? rawFont, TRotation rotation = TRotation.rotation_0, required int xmulty, required int ymulty, required bool isBold, TAlignment alignment = TAlignment.def, required String content, }) { String header() {ttextbox.dart — TEXTBOX
class TTextBox extends BasicTSPLArg<TTextBox> { late int _x; //起始x坐标 late int _y; //起始y坐标 late TFont _font; //字体:目前支持TSS16.BF2(16点阵) TSS24.BF2(24点阵) TSS32.BF2(32点阵) late TRotation _rotation ; //旋转角度:可选参数 0,90,180,270 late bool _rotationType; //false: 旋转每一个字 true:整体旋转 late int _mulX; //横向放大倍数 late int _mulY; //纵向放大倍数 late int _width; //文本框宽度 late int _lineSpace; //行间距 late bool _isBold; //是否加粗 late String _content; //内容 TTextBox({ required int x, required int y, TFont font = TFont.tss16, TRotation rotation= TRotation.rotation_0, bool rotationType=false, required int mulX, required int mulY, required int width, required int lineSpace, required bool isBold, required String content, }) { String header() {tversions.dart — OUT GETSETTING$(\ / ,\ / )
class TVersions extends OnlyTextHeaderArg<TVersions> {advanced_graphics.go — ELLIPSE
type TEllipse struct { BaseTSPLArg X int // 椭圆中心X坐标 Y int // 椭圆中心Y坐标 Width int // 椭圆宽度 Height int // 椭圆高度}func NewTEllipse() *TEllipse {func (t *TEllipse) SetEllipse(x, y, width, height int) *TEllipse {func (t *TEllipse) Header() string {func (t *TEllipse) Clause() *command.Clause {type TBline struct { BaseTSPLArg Height int // 黑线高度 Offset int // 黑线偏移}func NewTBline() *TBline {func (t *TBline) SetBline(height, offset int) *TBline {func (t *TBline) Header() string {func (t *TBline) Clause() *command.Clause {type TTextBox struct { BaseTSPLArg X int // 文本框起始X坐标 Y int // 文本框起始Y坐标 Width int // 文本框宽度 Height int // 文本框高度 Content string // 文本框内容 Size int // 字体大小}func NewTTextBox() *TTextBox {func (t *TTextBox) SetTextBox(x, y, width, height int) *TTextBox {func (t *TTextBox) SetContent(content string) *TTextBox {func (t *TTextBox) SetSize(size int) *TTextBox {func (t *TTextBox) Header() string {func (t *TTextBox) Clause() *command.Clause {type TDmatrix struct { BaseTSPLArg X int // 点阵起始X坐标 Y int // 点阵起始Y坐标 Width int // 点阵宽度 Height int // 点阵高度 Content string // 点阵内容}func NewTDmatrix() *TDmatrix {func (t *TDmatrix) SetDmatrix(x, y, width, height int) *TDmatrix {func (t *TDmatrix) SetContent(content string) *TDmatrix {func (t *TDmatrix) Header() string {func (t *TDmatrix) Clause() *command.Clause {type TMddle struct { BaseTSPLArg Value int // 中间值}func NewTMddle() *TMddle {func (t *TMddle) SetValue(value int) *TMddle {func (t *TMddle) Header() string {func (t *TMddle) Clause() *command.Clause {barcode.go — BARCODE
type TBarCode struct { BaseTSPLArg X int // 条码起始x坐标 Y int // 条码起始y坐标 CodeType string // 条码类型 Height int // 条码高度 Readable int // 是否显示可读文字 0:不显示 1:显示 Rotation types.Rotation // 条码旋转角度 Narrow int // 窄条宽度 Wide int // 宽条宽度 Content string // 条码内容}func NewTBarCode() *TBarCode {func (t *TBarCode) SetPosition(x, y int) *TBarCode {func (t *TBarCode) SetCodeType(codeType string) *TBarCode {func (t *TBarCode) SetHeight(height int) *TBarCode {func (t *TBarCode) SetReadable(readable int) *TBarCode {func (t *TBarCode) SetRotation(rotation types.Rotation) *TBarCode {func (t *TBarCode) SetWidth(narrow, wide int) *TBarCode {func (t *TBarCode) SetContent(content string) *TBarCode {func (t *TBarCode) Header() string {func (t *TBarCode) Clause() *command.Clause {type TQRCode struct { BaseTSPLArg X int // 二维码起始x坐标 Y int // 二维码起始y坐标 ECCLevel string // 纠错等级 L,M,Q,H CellWidth int // 单元格宽度 Mode string // 模式 A(自动) M(手动) Rotation types.Rotation // 旋转角度 Model string // 模型 M1,M2 Mask string // 掩码 Content string // 二维码内容}func NewTQRCode() *TQRCode {func (t *TQRCode) SetPosition(x, y int) *TQRCode {func (t *TQRCode) SetECCLevel(level string) *TQRCode {func (t *TQRCode) SetCellWidth(width int) *TQRCode {func (t *TQRCode) SetRotation(rotation types.Rotation) *TQRCode {func (t *TQRCode) SetContent(content string) *TQRCode {func (t *TQRCode) Header() string {func (t *TQRCode) Clause() *command.Clause {graphics.go — DIAGONAL
type TLine struct { BaseTSPLArg X1 int // 起始x坐标 Y1 int // 起始y坐标 X2 int // 结束x坐标 Y2 int // 结束y坐标}func NewTLine() *TLine {func (t *TLine) SetLine(x1, y1, x2, y2 int) *TLine {func (t *TLine) Header() string {func (t *TLine) Clause() *command.Clause {type TBar struct { BaseTSPLArg X int // 起始x坐标 Y int // 起始y坐标 Width int // 宽度 Height int // 高度}func NewTBar() *TBar {func (t *TBar) SetBar(x, y, width, height int) *TBar {func (t *TBar) Header() string {func (t *TBar) Clause() *command.Clause {type TBox struct { BaseTSPLArg X int // 起始x坐标 Y int // 起始y坐标 XEnd int // 结束x坐标 YEnd int // 结束y坐标 Thickness int // 线条粗细}func NewTBox() *TBox {func (t *TBox) SetBox(x, y, xEnd, yEnd, thickness int) *TBox {func (t *TBox) Header() string {func (t *TBox) Clause() *command.Clause {type TCircle struct { BaseTSPLArg X int // 圆心x坐标 Y int // 圆心y坐标 Radius int // 半径 Thickness int // 线条粗细}func NewTCircle() *TCircle {func (t *TCircle) SetCircle(x, y, radius, thickness int) *TCircle {func (t *TCircle) Header() string {func (t *TCircle) Clause() *command.Clause {image_tspl.go — BITMAP
type ImageMode intconst (func (m ImageMode) GetMode() int {type TImage struct { BaseTSPLArg X int // 图片起始X坐标 Y int // 图片起始Y坐标 ImageData []byte // 图片数据 Compress bool // 图片是否压缩(默认不压缩) Reverse bool // 图片是否反色(默认不反色) Mode ImageMode // 模式 GrayThreshold int // 二值化0-255(默认190) Width int // 图片宽度 Height int // 图片高度}func NewTImage() *TImage {func (t *TImage) SetPosition(x, y int) *TImage {func (t *TImage) SetImageData(data []byte) *TImage {func (t *TImage) SetCompress(compress bool) *TImage {func (t *TImage) SetReverse(reverse bool) *TImage {func (t *TImage) SetMode(mode ImageMode) *TImage {func (t *TImage) SetGrayThreshold(threshold int) *TImage {func (t *TImage) SetSize(width, height int) *TImage {func (t *TImage) Header() string {func (t *TImage) Clause() *command.Clause {type TPutImage struct { BaseTSPLArg X int // 图片起始X坐标 Y int // 图片起始Y坐标 ImageName string // 图片名称}func NewTPutImage() *TPutImage {func (t *TPutImage) SetPosition(x, y int) *TPutImage {func (t *TPutImage) SetImageName(name string) *TPutImage {func (t *TPutImage) Header() string {func (t *TPutImage) Clause() *command.Clause {type TDownloadBmp struct { BaseTSPLArg FileName string // 文件名 ImageData []byte // 图片数据}func NewTDownloadBmp() *TDownloadBmp {func (t *TDownloadBmp) SetFileName(name string) *TDownloadBmp {func (t *TDownloadBmp) SetImageData(data []byte) *TDownloadBmp {func (t *TDownloadBmp) Header() string {func (t *TDownloadBmp) Clause() *command.Clause {layout.go — GAP
type TLabel struct { BaseTSPLArg Height int // 间隙高度(mm) Offset int // 偏移量(mm)}func NewTLabel() *TLabel {func (t *TLabel) SetHeight(height int) *TLabel {func (t *TLabel) SetOffset(offset int) *TLabel {func (t *TLabel) Header() string {func (t *TLabel) Clause() *command.Clause {type TRibbon struct { BaseTSPLArg Enable bool // 是否启用色带}func NewTRibbon() *TRibbon {func (t *TRibbon) SetEnable(enable bool) *TRibbon {func (t *TRibbon) Header() string {func (t *TRibbon) Clause() *command.Clause {type TOffset struct { BaseTSPLArg Offset float64 // 偏移量(英寸)}func NewTOffset() *TOffset {func (t *TOffset) SetOffset(offset float64) *TOffset {func (t *TOffset) Header() string {func (t *TOffset) Clause() *command.Clause {type TShift struct { BaseTSPLArg Shift int // 移位值}func NewTShift() *TShift {func (t *TShift) SetShift(shift int) *TShift {func (t *TShift) Header() string {func (t *TShift) Clause() *command.Clause {type TReference struct { BaseTSPLArg X int // 参考点X坐标 Y int // 参考点Y坐标}func NewTReference() *TReference {func (t *TReference) SetReference(x, y int) *TReference {func (t *TReference) Header() string {func (t *TReference) Clause() *command.Clause {page.go — SIZE
type TSize struct { BaseTSPLArg Width float64 // 页面宽度(英寸) Height float64 // 页面高度(英寸)}func NewTSize() *TSize {func (t *TSize) SetSize(width, height float64) *TSize {func (t *TSize) Header() string {func (t *TSize) Clause() *command.Clause {type TGap struct { BaseTSPLArg Gap float64 // 间隙距离(英寸) Offset float64 // 偏移距离(英寸)}func NewTGap() *TGap {func (t *TGap) SetGap(gap, offset float64) *TGap {func (t *TGap) Header() string {func (t *TGap) Clause() *command.Clause {type TDirection struct { BaseTSPLArg Direction int // 打印方向 0:正向 1:反向}func NewTDirection() *TDirection {func (t *TDirection) SetDirection(direction int) *TDirection {func (t *TDirection) Header() string {func (t *TDirection) Clause() *command.Clause {type TClear struct { BaseTSPLArg}func NewTClear() *TClear {func (t *TClear) Header() string {func (t *TClear) Clause() *command.Clause {print.go — PRINT
type TPrint struct { BaseTSPLArg Copies int // 打印份数(默认一份)}func NewTPrint() *TPrint {func (t *TPrint) SetCopies(copies int) *TPrint {func (t *TPrint) Header() string {func (t *TPrint) Clause() *command.Clause {ribbon_control.go — SET PEEL
type TPeel struct { BaseTSPLArg Enable bool // 是否启用撕纸}func NewTPeel() *TPeel {func (t *TPeel) SetEnable(enable bool) *TPeel {func (t *TPeel) Header() string {func (t *TPeel) Clause() *command.Clause {type TTear struct { BaseTSPLArg Enable bool // 是否启用撕裂}func NewTTear() *TTear {func (t *TTear) SetEnable(enable bool) *TTear {func (t *TTear) Header() string {func (t *TTear) Clause() *command.Clause {type TSetRibbonEnd struct { BaseTSPLArg Action string // 动作 "BACKFEED", "STOP"}func NewTSetRibbonEnd() *TSetRibbonEnd {func (t *TSetRibbonEnd) SetAction(action string) *TSetRibbonEnd {func (t *TSetRibbonEnd) Header() string {func (t *TSetRibbonEnd) Clause() *command.Clause {type TGetRibbonEnd struct { BaseTSPLArg}func NewTGetRibbonEnd() *TGetRibbonEnd {func (t *TGetRibbonEnd) Header() string {func (t *TGetRibbonEnd) Clause() *command.Clause {type TSetOffTime struct { BaseTSPLArg Minutes int // 关机延迟分钟数}func NewTSetOffTime() *TSetOffTime {func (t *TSetOffTime) SetMinutes(minutes int) *TSetOffTime {func (t *TSetOffTime) Header() string {func (t *TSetOffTime) Clause() *command.Clause {type TGetOffTime struct { BaseTSPLArg}func NewTGetOffTime() *TGetOffTime {func (t *TGetOffTime) Header() string {func (t *TGetOffTime) Clause() *command.Clause {type TRed struct { BaseTSPLArg Enable bool // 是否启用红色}func NewTRed() *TRed {func (t *TRed) SetEnable(enable bool) *TRed {func (t *TRed) Header() string {func (t *TRed) Clause() *command.Clause {settings.go — SPEED
type TSpeed struct { BaseTSPLArg Speed int // 打印速度}func NewTSpeed() *TSpeed {func (t *TSpeed) SetSpeed(speed int) *TSpeed {func (t *TSpeed) Header() string {func (t *TSpeed) Clause() *command.Clause {type TDensity struct { BaseTSPLArg Density int // 浓度}func NewTDensity() *TDensity {func (t *TDensity) SetDensity(density int) *TDensity {func (t *TDensity) Header() string {func (t *TDensity) Clause() *command.Clause {type TReverse struct { BaseTSPLArg Enable bool // 是否启用反向打印}func NewTReverse() *TReverse {func (t *TReverse) SetEnable(enable bool) *TReverse {func (t *TReverse) Header() string {func (t *TReverse) Clause() *command.Clause {type TContinuous struct { BaseTSPLArg}func NewTContinuous() *TContinuous {func (t *TContinuous) Header() string {func (t *TContinuous) Clause() *command.Clause {type TAutoDot struct { BaseTSPLArg Enable bool // 是否启用自动点}func NewTAutoDot() *TAutoDot {func (t *TAutoDot) SetEnable(enable bool) *TAutoDot {func (t *TAutoDot) Header() string {func (t *TAutoDot) Clause() *command.Clause {type TBlack struct { BaseTSPLArg Height int // 黑标高度 Offset int // 黑标偏移}func NewTBlack() *TBlack {func (t *TBlack) SetHeight(height int) *TBlack {func (t *TBlack) SetOffset(offset int) *TBlack {func (t *TBlack) Header() string {func (t *TBlack) Clause() *command.Clause {status_control.go — ~!T
type TStatus struct { BaseTSPLArg}func NewTStatus() *TStatus {func (t *TStatus) Header() string {func (t *TStatus) Clause() *command.Clause {type TSN struct { BaseTSPLArg}func NewTSN() *TSN {func (t *TSN) Header() string {func (t *TSN) Clause() *command.Clause {type TSNs struct { BaseTSPLArg}func NewTSNs() *TSNs {func (t *TSNs) Header() string {func (t *TSNs) Clause() *command.Clause {type TVersion struct { BaseTSPLArg}func NewTVersion() *TVersion {func (t *TVersion) Header() string {func (t *TVersion) Clause() *command.Clause {type TVersions struct { BaseTSPLArg}func NewTVersions() *TVersions {func (t *TVersions) Header() string {func (t *TVersions) Clause() *command.Clause {type TModels struct { BaseTSPLArg}func NewTModels() *TModels {func (t *TModels) Header() string {func (t *TModels) Clause() *command.Clause {type TBatteryVolume struct { BaseTSPLArg}func NewTBatteryVolume() *TBatteryVolume {func (t *TBatteryVolume) Header() string {func (t *TBatteryVolume) Clause() *command.Clause {type TReadState struct { BaseTSPLArg}func NewTReadState() *TReadState {func (t *TReadState) Header() string {func (t *TReadState) Clause() *command.Clause {type TSelfTest struct { BaseTSPLArg}func NewTSelfTest() *TSelfTest {func (t *TSelfTest) Header() string {func (t *TSelfTest) Clause() *command.Clause {type TCut struct { BaseTSPLArg}func NewTCut() *TCut {func (t *TCut) Header() string {func (t *TCut) Clause() *command.Clause {type TCleanBmpFlash struct { BaseTSPLArg}func NewTCleanBmpFlash() *TCleanBmpFlash {func (t *TCleanBmpFlash) Header() string {func (t *TCleanBmpFlash) Clause() *command.Clause {text.go — TEXT
type TText struct { BaseTSPLArg X int // 文字起始x坐标 Y int // 文字起始y坐标 Font types.Font // 文字字体(默认TSS16) RawFont string // 自定义文字字体 Rotation types.Rotation // 文字旋转角度(默认不旋转) XMulti int // 文字横向放大倍数 YMulti int // 文字纵向放大倍数 IsBold bool // 文字是否加粗(默认不加粗) Alignment types.Alignment // 文本对齐 Content string // 打印的文本内容 Charset string // 文本内容编码(默认GBK)}func NewTText() *TText {func (t *TText) SetPosition(x, y int) *TText {func (t *TText) SetFont(font types.Font) *TText {func (t *TText) SetRawFont(font string) *TText {func (t *TText) SetRotation(rotation types.Rotation) *TText {func (t *TText) SetMulti(xMulti, yMulti int) *TText {func (t *TText) SetBold(bold bool) *TText {func (t *TText) SetAlignment(alignment types.Alignment) *TText {func (t *TText) SetContent(content string) *TText {func (t *TText) SetCharset(charset string) *TText {func (t *TText) Header() string {func (t *TText) Clause() *command.Clause {font.go
type Font struct { Name string // 字体名称 Width int // 字体宽度 Height int // 字体高度}type Rotation stringconst (type Alignment intconst (func (a Alignment) String() string {TAutoDot.java — SETC AUTODOTTED
public class TAutoDot extends BasicTSPLArg<TAutoDot> { private boolean enable; public String header() { public CommandClause clause() {TBar.java — BAR
public class TBar extends BasicTSPLArg<TBar> { private int x; private int y; private int width; private int height; private Line line = Line.SOLID_LINE; public String header() { public CommandClause clause() {TBarCode.java — BARCODE
public class TBarCode extends BasicTSPLArg<TBarCode> { private int x; private int y; private CodeType codeType = CodeType.CODE_128; private int height; private ShowType showType = ShowType.NO_SHOW; private Rotation rotation = Rotation.ROTATION_0; private int cellWidth =1; private int ratio=1; private String content; public String header() { public CommandClause clause() { public String callback(String source) {TBatteryVolume.java — READC BATTERY_LEVEL
public class TBatteryVolume extends OnlyTextHeaderArg<TBatteryVolume> { public String header() {TBlack.java — SETCOLOR BLACK
public class TBlack extends OnlyTextHeaderArg<TBlack> { public String header() {TBline.java — BLINE
public class TBline extends BasicTSPLArg<TBline> { private int height = 3; private int offset = 0; public String header() { public CommandClause clause() {TBlock.java — BLOCK
public class TBlock extends BasicTSPLArg<TBlock> { private int x; private int y; private int width; private int height; private Font font = Font.TSS16;//字体:目前支持TSS16.BF2(16点阵) TSS24.BF2(24点阵) TSS32.BF2(32点阵) private String rawFont; private Rotation rotation = Rotation.ROTATION_0; private int xmulti; private int ymulti; private int lineSpace; private Alignment alignment = Alignment.DEFAULT; private Fit fit = Fit.NO_SHRINK; private String content; public String header() { public CommandClause clause() { public String callback(String source) {TBox.java — BOX
public class TBox extends BasicTSPLArg<TBox> { private int startX; private int startY; private int endX; private int endY; private int width; private int radius; public String header() { public CommandClause clause() {TBtBleMac.java — DIAGNOSTIC REPORT BTBLEMAC
public class TBtBleMac extends OnlyTextHeaderArg<TBtBleMac> { public String header() {TBtModel.java — DIAGNOSTIC REPORT BTMODULE
public class TBtModel extends OnlyTextHeaderArg<TBtModel> { public String header() {TBtName.java — DIAGNOSTIC REPORT BTNAME
public class TBtName extends OnlyTextHeaderArg<TBtName> { public String header() {TBtVersion.java — DIAGNOSTIC REPORT BTVERSION
public class TBtVersion extends OnlyTextHeaderArg<TBtVersion> { public String header() {TCardSpace.java — DIAGNOSTIC REPORT FPHYSPACE
public class TCardSpace extends OnlyTextHeaderArg<TCardSpace> { public String header() {TCircle.java — CIRCLE
public class TCircle extends BasicTSPLArg<TCircle> { private int x; private int y; private int width; private int radius; public String header() { public CommandClause clause() {TCleanBmpFlash.java — BMPDELETE
public class TCleanBmpFlash extends BasicTSPLArg<TCleanBmpFlash> { private final int index; public String header() { public CommandClause clause() {TClear.java — CLS
public class TClear extends OnlyTextHeaderArg<TClear> { public String header() {TContinuous.java — GAP
public class TContinuous extends BasicTSPLArg<TContinuous> { private int height = 0; private int offset = 0; public String header() { public CommandClause clause() {TCut.java — SET CUTTER
public class TCut extends BasicTSPLArg<TCut> { private boolean enable; public String header() { public CommandClause clause() {TDensity.java — DENSITY
public class TDensity extends BasicTSPLArg<TDensity> { private int density; public String header() { public CommandClause clause() {TDirection.java — DIRECTION
public class TDirection extends BasicTSPLArg<TDirection> { private Direction direction = Direction.UP_OUT; private Mirror mirror = Mirror.NO_MIRROR; public enum Direction { private final int direction; public int getDirection() { public enum Mirror { private final int mirror; public int getMirror() { public String header() { public CommandClause clause() {TDmatrix.java — DMATRIX
public class TDmatrix extends BasicTSPLArg<TDmatrix> { private int x;//起始x坐标 private int y;//起始y坐标 private int width;//条码宽度 private int height;//条码高度 private String content;//条码内容 public String header() { public CommandClause clause() { public String callback(String source) {TDownloadBmp.java — DOWNLOAD
public class TDownloadBmp extends BasicTSPLArg<TDownloadBmp> { private String fileName; private byte[] data; public String header() { public CommandClause clause() {TDownloadBmpFlash.java — DOWNLOAD
public class TDownloadBmpFlash extends BasicTSPLArg<TDownloadBmpFlash> { private int index; private byte[] data; public String header() { public CommandClause clause() {TDownloadBmpFlash2.java — DOWNLOAD
public class TDownloadBmpFlash2 extends BasicTSPLArg<TDownloadBmpFlash2> { private int index; private byte[] data; public String header() { public CommandClause clause() {TDramFileList.java — DIAGNOSTIC REPORT DFILELIST
public class TDramFileList extends OnlyTextHeaderArg<TDramFileList> { public String header() {TDramSpace.java — DIAGNOSTIC REPORT DPHYSPACE
public class TDramSpace extends OnlyTextHeaderArg<TDramSpace> { public String header() {TEllipse.java — ELLIPSE
public class TEllipse extends BasicTSPLArg<TEllipse> { private int x; private int y; private int width; private int height; private int thickness; public String header() { public CommandClause clause() {TFlashFileList.java — DIAGNOSTIC REPORT FFILELIST
public class TFlashFileList extends OnlyTextHeaderArg<TFlashFileList> { public String header() {TFlashSpace.java — DIAGNOSTIC REPORT FPHYSPACE
public class TFlashSpace extends OnlyTextHeaderArg<TFlashSpace> { public String header() {TGBKCode.java — CODEPAGE 936
public class TGBKCode extends OnlyTextHeaderArg<TGBKCode> { public String header() {TGap.java — SET GAP
public class TGap extends BasicTSPLArg<TGap> { private boolean enable; public String header() { public CommandClause clause() {TGetOffTime.java — READC OFFTIME
public class TGetOffTime extends OnlyTextHeaderArg<TGetOffTime> { public String header() {TGetRibbonEnd.java — DIAGNOSTIC REPORT RIBBONEND
public class TGetRibbonEnd extends OnlyTextHeaderArg<TGetRibbonEnd> { public String header() {TImage.java — BITMAP
public class TImage<T extends ISourceImage> extends BasicTSPLArg<TImage<T>> { private int x; private int y; private T image; private boolean compress; private boolean reverse; private ImageMode mode = ImageMode.OVERWRITE; private int grayThreshold = 190; public String header() { public CommandClause clause() {TLabel.java — GAP
public class TLabel extends BasicTSPLArg<TLabel> { private int height = 3; private int offset = 0; public String header() { public CommandClause clause() {TLearnPaperGap.java — GAPDETECT
public class TLearnPaperGap extends OnlyTextHeaderArg<TLearnPaperGap> { public String header() {TLine.java — LINE
public class TLine extends BasicTSPLArg<TLine> implements BasicLineArg<String> { private int start_x; private int start_y; private int end_x; private int end_y; private int width; private LineM line = LineM.SOLID_LINE; public String header() { public CommandClause clause() {TMddle.java — READC MDDLE
public class TMddle extends OnlyTextHeaderArg<TMddle> { public String header() {TModels.java — OUT GETSETTING$(\ / ,\ / )
public class TModels extends OnlyTextHeaderArg<TModels> { public String header() {TOffset.java — OFFSET
public class TOffset extends BasicTSPLArg<TOffset> { private int offset = 0;//进纸 public String header() { public CommandClause clause() {TPage.java — SIZE
public class TPage extends BasicTSPLArg<TPage> { private int width; private int height; public String header() { public CommandClause clause() {TPeel.java — SET PEEL
public class TPeel extends BasicTSPLArg<TPeel> { private boolean enable = true; public String header() { public CommandClause clause() {TPrint.java — PRINT
public class TPrint extends BasicTSPLArg<TPrint> { private int copies; public String header() { public CommandClause clause() {TPrinterBase.java — DIAGNOSTIC REPORT PRINTERBASE
public class TPrinterBase extends OnlyTextHeaderArg<TPrinterBase> { public String header() {TPrtLife.java — DIAGNOSTIC REPORT MILAGE
public class TPrtLife extends OnlyTextHeaderArg<TPrtLife> { public String header() {TPutImage.java — PUTBMP
public class TPutImage extends BasicTSPLArg<TPutImage> { private int x; private int y; private String filename; public String header() { public CommandClause clause() { public String callback(String source) {TQRCode.java — QRCODE
public class TQRCode extends BasicTSPLArg<TQRCode> { private int x;//起始x坐标 private int y;//起始y坐标 private CorrectLevel correctLevel = CorrectLevel.L; private Rotation rotation = Rotation.ROTATION_0;//旋转角度 private int cellWidth; private String content; private String version; public String header() { public CommandClause clause() { public String callback(String source) {TReadHardwareVersion.java — READC HW_VERSION
public class TReadHardwareVersion extends OnlyTextHeaderArg<TReadHardwareVersion> { public String header() {TReadState.java — READSTA
public class TReadState extends OnlyTextHeaderArg<TReadState> { public String header() {TRed.java — SETCOLOR RED
public class TRed extends BasicTSPLArg<TRed> { private int density; public String header() { public CommandClause clause() {TReference.java — REFERENCE
public class TReference extends BasicTSPLArg<TReference> { private int horizontal = 0; private int vertical = 0; public String header() { public CommandClause clause() {TResetFactory.java — RESET FACTORY
public class TResetFactory extends OnlyTextHeaderArg<TResetFactory> { public String header() {TReverse.java — REVERSE
public class TReverse extends BasicTSPLArg<TReverse> { private int x;//起始x坐标 private int y;//起始y坐标 private int height; private int width; public String header() { public CommandClause clause() {TRibbon.java — SET RIBBON
public class TRibbon extends BasicTSPLArg<TRibbon> { private boolean enable; public String header() { public CommandClause clause() {TSN.java — READC PRDOCUTID
public class TSN extends OnlyTextHeaderArg<TSN> { public String header() {TSNs.java — OUT GETSETTING$(\ / ,\ / )
public class TSNs extends OnlyTextHeaderArg<TSNs> { public String header() {TSelfTest.java — SELFTEST
public class TSelfTest extends OnlyTextHeaderArg<TSelfTest> { public String header() {TSetOffTime.java — WRITEC
public class TSetOffTime extends BasicTSPLArg<TSetOffTime> { private int time; public String header() { public CommandClause clause() {TSetRibbonEnd.java — SET RIBBONEND
public class TSetRibbonEnd extends BasicTSPLArg<TSetRibbonEnd> { private boolean enable; public String header() { public CommandClause clause() {TShift.java — SHIFT
public class TShift extends BasicTSPLArg<TShift> { private int shift = 0; public String header() { public CommandClause clause() {TSpeed.java — SPEED
public class TSpeed extends BasicTSPLArg<TSpeed> { private int speed;//速度 public String header() { public CommandClause clause() {TStatus.java — 1B 21 3F
public class TStatus extends OnlyBinaryHeaderArg<TStatus> { public byte[] header() {TTear.java — SET TEAR
public class TTear extends BasicTSPLArg<TTear> { private boolean tear = true; public String header() { public CommandClause clause() {TText.java — TEXT
public class TText extends BasicTSPLArg<TText> { private int x; private int y; private Font font = Font.TSS16; private String rawFont; private Rotation rotation = Rotation.ROTATION_0; private int xmulti = 1; private int ymulti = 1; private boolean isBold; private Alignment alignment = Alignment.DEFAULT; private String content; public String header() { public CommandClause clause() { public String callback(String source) {TTextBox.java — TEXTBOX
public class TTextBox extends BasicTSPLArg<TTextBox> { private int x;//起始x坐标 private int y;//起始y坐标 private Font font = Font.TSS16;//字体:目前支持TSS16.BF2(16点阵) TSS24.BF2(24点阵) TSS32.BF2(32点阵) private Rotation rotation = Rotation.ROTATION_0;//旋转角度:可选参数 0,90,180,270 private boolean rotationType;//false: 旋转每一个字 true:整体旋转 private int mulX;//横向放大倍数 private int mulY;//纵向放大倍数 private int width;//文本框宽度 private int lineSpace;//行间距 private boolean isBold;//是否加粗 private String content;//内容 public String header() { public CommandClause clause() { public String callback(String source) {TUTF8Code.java — CODEPAGE UTF-8
public class TUTF8Code extends OnlyTextHeaderArg<TUTF8Code> { public String header() {TVersion.java — READC VERSION
public class TVersion extends OnlyTextHeaderArg<TVersion> { public String header() {TVersions.java — OUT GETSETTING$(\ / ,\ / )
public class TVersions extends OnlyTextHeaderArg<TVersions> { public String header() {TWifiVersion.java — DIAGNOSTIC REPORT WIFIVERSION
public class TWifiVersion extends OnlyTextHeaderArg<TWifiVersion> { public String header() {Alignment.java
public enum Alignment { private final int alignment; public int getAlignment() {CodeType.java
public enum CodeType { private final String CodeType; public String getCodeType() {CorrectLevel.java
public enum CorrectLevel { private final String level; public String getLevel() {Rotation.java
public enum Rotation { private final int rotation; public int getRotation() {ShowType.java
public enum ShowType { private final int showType; public int getShowType() {JavaScript
Section titled “JavaScript”bar.ts — BAR
export class TBar extends BasicTSPLArg<TBar> { private x: number; private y: number; private width: number; private height: number; private line: TTLine; constructor(options: { x?: number y?: number width: number height: number line?: TTLine }) {barcode.ts — BARCODE
export class TBarCode extends BasicTSPLArg<TBarCode> { private x: number; private y: number; private codeType: TCodeType; private height: number; private showType: TShowType; private rotation: TRotation; private cellWidth: number; private content: string; constructor(options: { x?: number y?: number codeType?: TCodeType height?: number showType?: TShowType rotation?: TRotation cellWidth?: number /** content: string }) {black.ts — SETCOLOR BLACK
export class TBlack extends OnlyTextHeaderArg<TBlack> { constructor() {bline.ts — BLINE
export class TBline extends BasicTSPLArg<TBline> { private height: number; private offset: number; constructor(options?: { height?: number offset?: number }) {box.ts — BOX
export class TBox extends BasicTSPLArg<TBox> { private startX: number; private startY: number; private endX: number; private endY: number; private width: number; private radius: number; constructor(options: { startX?: number startY?: number endX: number endY: number width?: number radius?: number }) {circle.ts — CIRCLE
export class TCircle extends BasicTSPLArg<TCircle> { private x: number; private y: number; private width: number; private radius: number; constructor(options: { x?: number y?: number width: number radius: number }) {continuous.ts — GAP
export class TContinuous extends BasicTSPLArg<TContinuous> { private height: number; private offset: number; constructor(options?: { height?: number offset?: number }) {cut.ts — SET CUTTER 1 / SET CUTTER OFF
export class TCut extends OnlyTextHeaderArg<TCut> { private readonly enable: boolean; constructor(options?: { enable?: boolean }) {density.ts — DENSITY
export class TDensity extends BasicTSPLArg<TDensity> { private density: number; constructor(options?: { density?: number }) {direction.ts — DIRECTION
export class TDirection extends BasicTSPLArg<TDirection> { private direction: DirectionType; constructor(options?: { direction?: DirectionType, }) {export enum DirectionType {dmatrix.ts — DMATRIX
export class TDmatrix extends BasicTSPLArg<TDmatrix> { private x: number; private y: number; private width: number; private height: number; private content: string; constructor(options: { x?: number y?: number width: number height: number content: string }) {downloadbmp.ts — DOWNLOAD
export class TDownloadBmp extends BasicTSPLArg<TDownloadBmp> { private fileName: string; private readonly data: Uint8Array; constructor(options: { fileName: string, data: Uint8Array, }) { const alignData = this.align32(this.data); const tc = TSPLCommand.with(this.header()) .appendText('F') .append(TextAppendat.create(this.fileName).quote()) .appendNumber(alignData.length); const command = Commander.make() .pushClause(tc.clause(), false) .pushText(',', {newline: false}) .pushBinary(alignData, false) .newline() .command(); const bmpSize = data.length; const bmpOffset = this.getOffset(data); const width = this.getWidth(data); const widthshengyu = width % 8; const datas = new Uint8Array(bmpSize);ellipse.ts — ELLIPSE
export class TEllipse extends BasicTSPLArg<TEllipse> { private x: number; private y: number; private width: number; private height: number; private thickness: number; constructor(options: { x?: number y?: number width: number height: number thickness: number }) {gap.ts — GAP
export class TGap extends BasicTSPLArg<TGap> { private enable: boolean; constructor(options?: { enable?: boolean, }) {gbkcode.ts — CODEPAGE 936
export class TGBKCode extends OnlyTextHeaderArg<TGBKCode> { constructor() {getribbonend.ts — DIAGNOSTIC REPORT RIBBONEND
export class TGetRibbonEnd extends OnlyTextHeaderArg<TGetRibbonEnd > { constructor() {image.ts — BITMAP
export class TImage extends BasicTSPLArg<TImage> { private x: number; private y: number; private readonly compress: boolean; private readonly mode: TImageMode; private readonly image: InputImage; private readonly reverse: boolean; private readonly threshold: number; constructor(options: { x?: number, y?: number, compress?: boolean, reverse?: boolean, threshold?: number, mode?: TImageMode, image: InputImage, }) { const processer = new Pbita({ command:'tspl', threshold: this.threshold, compress: this.compress, reverse: this.reverse, } ); const info = processer.process(this.image); const fimage = info.result.data; const fbytes = info.result.bytes; const eWidth = Math.floor((width % 8 === 0) ? (width / 8) : (width / 8 + 1)); const commander = Commander.make(); const ccmd = TSPLCommand.with(this.header()) .appendNumber(this.x) .appendNumber(this.y) .appendNumber(eWidth) .appendNumber(height); const command = commander.command();label.ts — GAP
export class TLabel extends BasicTSPLArg<TLabel> { private height: number; private offset: number; constructor(options?: { height?: number offset?: number }) {learnpapergap.ts — GAPDETECT
export class TLearnPaperGap extends OnlyTextHeaderArg<TLearnPaperGap> { constructor() {line.ts — LINE
export class TLine extends BasicTSPLArg<TLine> { private startX: number; private startY: number; private endX: number; private endY: number; private width: number; private line: TLineM; constructor(options: { startX?: number startY?: number endX?: number endY?: number width?: number line?: TLineM }) {models.ts — OUT GETSETTING$("SYSTEM","INFORMATION","MODEL")
export class TModels extends OnlyTextHeaderArg<TModels> { constructor() {offset.ts — OFFSET
export class TOffset extends BasicTSPLArg<TOffset> { private offset: number; constructor(options?: { offset?: number }) {page.ts — SIZE
export class TPage extends BasicTSPLArg<TPage> { private width: number; private height: number; constructor(options: { width: number, height: number, }) {peel.ts — SET PEEL
export class TPeel extends BasicTSPLArg<TPeel> { private enable: boolean; constructor(options?: { enable?: boolean, }) {print.ts — PRINT
export class TPrint extends BasicTSPLArg<TPrint> { private copies: number; constructor(options?: { copies?: number, }) {putimage.ts — PUTBMP
export class TPutImage extends BasicTSPLArg<TPutImage> { private x: number; private y: number; private filename: string; private charset: string; constructor(options: { x?: number, y?: number, filename: string, charset?: string }) {qrcode.ts — QRCODE
export class TQRCode extends BasicTSPLArg<TQRCode> { private x: number; private y: number; private correctLevel: TCorrectLevel; private cellWidth: number; private rotation: TRotation; private version: string; private content: string; private charset: string; constructor(options: { x?: number y?: number correctLevel?: TCorrectLevel version?: string rotation?: TRotation cellWidth?: number content: string charset?: string }) {readhardwareversion.ts — READC HW_VERSION
export class TReadHardwareVersion extends OnlyTextHeaderArg<TReadHardwareVersion> { constructor() {readstate.ts — READSTA
export class TReadState extends OnlyTextHeaderArg<TReadState > { constructor() {red.ts — SETCOLOR RED
export class TRed extends BasicTSPLArg<TRed> { private density: number; constructor(options?: { density?: number }) {reference.ts — REFERENCE
export class TReference extends BasicTSPLArg<TReference> { private x: number; private y: number; constructor(options?: { x?: number, y?: number, }) {resetfactory.ts — RESET FACTORY
export class TResetFactory extends OnlyTextHeaderArg<TResetFactory> { constructor() {ribbon.ts — SET RIBBON
export class TRibbon extends BasicTSPLArg<TRibbon> { private enable: boolean; constructor(options?: { enable?: boolean, }) {selftest.ts — SELFTEST
export class TSelfTest extends OnlyTextHeaderArg<TSelfTest> { constructor() {setribbonend.ts — SET RIBBONEND ON / SET RIBBONEND OFF
export class TSetRibbonEnd extends OnlyTextHeaderArg<TSetRibbonEnd> { private readonly enable: boolean; constructor(options?: { enable?: boolean }) {shift.ts — SHIFT
export class TShift extends BasicTSPLArg<TShift> { private shift: number; constructor(options: { shift?: number }) {sn.ts — READC PRDOCUTID
export class TSN extends OnlyTextHeaderArg<TSN> { constructor() {sns.ts — OUT GETSETTING$("SYSTEM","INFORMATION","SERIAL")
export class TSNs extends OnlyTextHeaderArg<TSNs> { constructor() {speed.ts — SPEED
export class TSpeed extends BasicTSPLArg<TSpeed> { private speed: number; constructor(options?: { speed?: number, }) {tear.ts — SET TEAR
export class TTear extends BasicTSPLArg<TTear> { private enable: boolean; constructor(options?: { enable?: boolean, }) {text.ts — TEXT
export class TText extends BasicTSPLArg<TText> { private x: number; private y: number; private font: TFont; private rawFont: string; private rotation: number; private mulX: number; private mulY: number; private isBold: boolean; private alignment: TAlignment; private content: string; private charset: string; constructor(options: { x?: number, y?: number, font?: TFont, rawFont?: string, rotation?: number, mulX?: number, mulY?: number, isBold?: boolean, alignment?: TAlignment, content: string, charset?: string }) {textbox.ts — TEXTBOX
export class TTextBox extends BasicTSPLArg<TTextBox> { private x: number; private y: number; private font: TFont; private rotation: TRotation; private rotationType: boolean; private mulX: number; private mulY: number; private width: number; private lineSpace: number; private isBold: boolean; private content: string; constructor(options: { x?: number, y?; number, font?: TFont, rotation?: TRotation, mulX?: number, mulY?: number, width?: number, lineSpace?: number, rotationType?: boolean, isBold?: boolean, content: string, }) {utf8code.ts — CODEPAGE UTF-8
export class TUTF8Code extends OnlyTextHeaderArg<TUTF8Code> { constructor() {version.ts — READC VERSION
export class TVersion extends OnlyTextHeaderArg<TVersion> { constructor() {versions.ts — OUT GETSETTING$("SYSTEM","INFORMATION","VERSION")
export class TVersions extends OnlyTextHeaderArg<TVersions> { constructor() {index.ts
Objective-C
Section titled “Objective-C”TBar.h
@interface TBar : BasicTSPLArg@property(nonatomic , readonly) TBar *(^x)(int startX);@property(nonatomic , readonly) TBar *(^y)(int startY);@property(nonatomic , readonly) TBar *(^width)(int lineWidth);@property(nonatomic , readonly) TBar *(^height)(int lineHeight);@property(nonatomic , readonly) TBar *(^lineType)(TLineType l);@endTBar.m — BAR
@interface TBar()@property(nonatomic , assign) int startX;@property(nonatomic , assign) int startY;@property(nonatomic , assign) int lineWidth;@property(nonatomic , assign) int lineHeight;@property(nonatomic , strong) TSPLLineType *l;@end@endTBarCode.h
@interface TBarCode : BasicTSPLArg@property (nonatomic , readonly) TBarCode *(^x)(int startX);@property (nonatomic , readonly) TBarCode *(^y)(int startY);@property (nonatomic , readonly) TBarCode *(^codeType)(TCodeType ctype);@property (nonatomic , readonly) TBarCode *(^height)(int h);@property (nonatomic , readonly) TBarCode *(^showType)(TShowType stype);@property (nonatomic , readonly) TBarCode *(^rotation)(TRotation rot);@property (nonatomic , readonly) TBarCode *(^cellwidth)(int width);@property (nonatomic , readonly) TBarCode *(^content)(NSString * cnt);@endTBarCode.m — BARCODE
@interface TBarCode()@property (nonatomic , assign)int startX;@property (nonatomic , assign)int startY;@property (nonatomic , strong)TSPLCodeType *ctype;@property (nonatomic , assign)int h;@property (nonatomic , strong)TSPLShowType *stype;@property (nonatomic , strong)TSPLRotation *rot;@property (nonatomic , assign)int cwidth;@property (nonatomic , strong)NSString * cnt;@end@endTBox.h
@interface TBox : BasicTSPLArg@property(nonatomic , readonly) TBox *(^startX)(int sx);@property(nonatomic , readonly) TBox *(^startY)(int sy);@property(nonatomic , readonly) TBox *(^endX)(int ex);@property(nonatomic , readonly) TBox *(^endY)(int ey);@property(nonatomic , readonly) TBox *(^width)(int lineWidth);@property(nonatomic , readonly) TBox *(^radius)(int r);@endTBox.m — BOX
@interface TBox()@property(nonatomic , assign) int sx;@property(nonatomic , assign) int sy;@property(nonatomic , assign) int ex;@property(nonatomic , assign) int ey;@property(nonatomic , assign) int w;@property(nonatomic , assign) int r;@end@endTCircle.h
@interface TCircle : BasicTSPLArg@property(nonatomic , readonly) TCircle *(^startX)(int sx);@property(nonatomic , readonly) TCircle *(^startY)(int sy);@property(nonatomic , readonly) TCircle *(^width)(int lineWidth);@property(nonatomic , readonly) TCircle *(^radius)(int r);@endTCircle.m — CIRCLE
@interface TCircle()@property(nonatomic , assign) int sx;@property(nonatomic , assign) int sy;@property(nonatomic , assign) int w;@property(nonatomic , assign) int r;@end@endTCleanBmpFlash.h
@interface TCleanBmpFlash : BasicTSPLArg@property (nonatomic , readonly) TCleanBmpFlash *(^index)(int ind);@endTCleanBmpFlash.m — BMPDELETE
@interface TCleanBmpFlash()@property (nonatomic, assign) int ind;@end@endTCut.h
@interface TCut : BasicTSPLArg@property (nonatomic , readonly) TCut *(^enable)(BOOL isEnable);@endTCut.m — SET CUTTER
@interface TCut()@property (nonatomic , assign) BOOL isEnable;@end@endTDensity.h
@interface TDensity : BasicTSPLArg@property (nonatomic , readonly) TDensity *(^density)(int dens);@endTDensity.m — DENSITY
@interface TDensity()@property (nonatomic , assign) int dens;@end@endTDirection.h
@interface TDirection : BasicTSPLArg@property (nonatomic , readonly) TDirection *(^mirror)(Mirror mir);@property (nonatomic , readonly) TDirection *(^direction)(Direction dir);-(NSInteger)getMirror;-(NSInteger)getDirection;@endTDirection.m — DIRECTION
@interface TDirection()@property (nonatomic , assign) NSInteger mir;@property (nonatomic , assign) NSInteger dir;@end@endTDmatrix.h
@interface TDmatrix : BasicTSPLArg@property(nonatomic , readonly) TDmatrix *(^x)(int startX);@property(nonatomic , readonly) TDmatrix *(^y)(int startY);@property(nonatomic , readonly) TDmatrix *(^width)(int lineWidth);@property(nonatomic , readonly) TDmatrix *(^height)(int lineHight);@property(nonatomic , readonly) TDmatrix *(^content)(NSString *cnt);@endTDmatrix.m — DMATRIX
@interface TDmatrix()@property (nonatomic , assign)int startX;@property (nonatomic , assign)int startY;@property (nonatomic , assign)int dW;@property (nonatomic , assign)int dH;@property (nonatomic , strong)NSString *cnt;@end@endTDownloadBmpFlash.h
@interface TDownloadBmpFlash : BasicTSPLArg@property (nonatomic , readonly) TDownloadBmpFlash *(^index)(int ind);@property (nonatomic , readonly) TDownloadBmpFlash *(^data)(NSData *dat);@endTDownloadBmpFlash.m — DOWNLOAD
@interface TDownloadBmpFlash()@property (nonatomic , assign) int ind;@property (nonatomic , strong) NSData *dat;@end@endTGap.h
@interface TGap : BasicTSPLArg@property (nonatomic , readonly) TGap *(^enable)(BOOL isEnable);@endTImage.h
@interface TImage : BasicTSPLArg@property (nonatomic , readonly) TImage *(^x)(int originX);@property (nonatomic , readonly) TImage *(^y)(int originY);@property (nonatomic , readonly) TImage *(^image)(UIImage *img);@property (nonatomic , readonly) TImage *(^width)(int imageWidth);@property (nonatomic , readonly) TImage *(^height)(int imageHeight);@property (nonatomic , readonly) TImage *(^compress)(BOOL isCompress);@property (nonatomic , readonly) TImage *(^mode)(TImageMode imageMode);@property (nonatomic , readonly) TImage *(^reverse)(BOOL isReverse);@endTImage.m — BITMAP
@interface TImage()@property (nonatomic , assign) int startX;@property (nonatomic , assign) int startY;@property (nonatomic , assign) int imageWidth;@property (nonatomic , assign) int imageHeight;@property (nonatomic , assign) BOOL isCompress;@property (nonatomic , assign) TImageMode imageMode;@property (nonatomic , strong) UIImage *img;@property (nonatomic , assign) BOOL isReverse;@end@endTLine.h
@interface TLine : BasicTSPLArg@property (nonatomic , readonly) TLine *(^start_x)(int startx);@property (nonatomic , readonly) TLine *(^start_y)(int starty);@property (nonatomic , readonly) TLine *(^end_x)(int endx);@property (nonatomic , readonly) TLine *(^end_y)(int endy);@property (nonatomic , readonly) TLine *(^width)(int lineWidth);@property (nonatomic , readonly) TLine *(^height)(int lineHeight);@property (nonatomic , readonly) TLine *(^lineMode)(TLineMode l);@endTLine.m — LINE
@interface TLine()@property (nonatomic , assign)int startX;@property (nonatomic , assign)int startY;@property (nonatomic , assign)int endx;@property (nonatomic , assign)int endy;@property (nonatomic , assign)int lineWidth;@property (nonatomic , assign)int lineHeight;@property (nonatomic , strong)TSPLLineMode *l;@end@endTPage.h
@interface TPage : BasicTSPLArg@property (nonatomic , readonly) TPage *(^width)(int width);@property (nonatomic , readonly) TPage *(^height)(int height);@endTPage.m — SIZE
@interface TPage()@property (nonatomic , assign) int lineWidth;@property (nonatomic , assign) int lineHeight;@property (nonatomic , strong) NSString *widthStr;@property (nonatomic , strong) NSString *heightStr;@end@endTPrint.h
@interface TPrint : BasicTSPLArg@property (nonatomic , readonly) TPrint *(^copies)(int copyCount);@endTPrint.m — PRINT
@interface TPrint()@property (nonatomic , assign) int copyCount;@end@endTQRCode.h
@interface TQRCode : BasicTSPLArg@property (nonatomic , readonly) TQRCode *(^x)(int startX);@property (nonatomic , readonly) TQRCode *(^y)(int startY);@property (nonatomic , readonly) TQRCode *(^cellWidth)(int cWidth);@property (nonatomic , readonly) TQRCode *(^correctLevel)(TCorrectLevel clevel);@property (nonatomic , readonly) TQRCode *(^rotation)(TRotation rot);@property (nonatomic , readonly) TQRCode *(^content)(NSString * cnt);@property (nonatomic , readonly) TQRCode *(^version)(NSString * vsion);@endTQRCode.m — QRCODE
@interface TQRCode()@property (nonatomic , assign) int startX;@property (nonatomic , assign) int startY;@property (nonatomic , assign) int cWidth;@property (nonatomic , strong) NSString *cnt;@property (nonatomic , strong) NSString *vs;@property (nonatomic , strong) TSPLCorrectLevel *clevel;@property (nonatomic , strong) TSPLRotation *rot;@end@endTReverse.h
@interface TReverse : BasicTSPLArg@property (nonatomic , readonly) TReverse *(^x)(int startX);@property (nonatomic , readonly) TReverse *(^y)(int startY);@property (nonatomic , readonly) TReverse *(^height)(int h);@property (nonatomic , readonly) TReverse *(^width)(int w);@endTReverse.m — REVERSE
@interface TReverse()@property (nonatomic , assign) int startX;@property (nonatomic , assign) int startY;@property (nonatomic , assign) int h;@property (nonatomic , assign) int w;@end@endTSpeed.h
@interface TSpeed : BasicTSPLArg@property (nonatomic , readonly) TSpeed *(^speed)(int s);@endTText.h
@interface TText : BasicTSPLArg@property (nonatomic , readonly) TText *(^x)(int startX);@property (nonatomic , readonly) TText *(^y)(int startY);@property (nonatomic , readonly) TText *(^font)(TFont fnt);@property (nonatomic , readonly) TText *(^rotation)(TRotation rot);@property (nonatomic , readonly) TText *(^xmulti)(int xmul);@property (nonatomic , readonly) TText *(^ymulti)(int ymul);@property (nonatomic , readonly) TText *(^isBold)(BOOL bold);@property (nonatomic , readonly) TText *(^content)(NSString * cnt);@endTText.m — TEXT
@interface TText()@property (nonatomic , assign) int startX;@property (nonatomic , assign) int startY;@property (nonatomic , assign) TFont fnt;@property (nonatomic , assign) TRotation rot;@property (nonatomic , assign) int xmul;@property (nonatomic , assign) int ymul;@property (nonatomic , assign) BOOL bold;@property (nonatomic , strong) NSString * cnt;@end@endTTextBox.h
@interface TTextBox : BasicTSPLArg@property (nonatomic , readonly) TTextBox *(^x)(int startX);@property (nonatomic , readonly) TTextBox *(^y)(int startY);@property (nonatomic , readonly) TTextBox *(^font)(TFont fnt);@property (nonatomic , readonly) TTextBox *(^rotation)(TRotation rot);@property (nonatomic , readonly) TTextBox *(^rotationType)(BOOL rType);@property (nonatomic , readonly) TTextBox *(^mulX)(int xmul);@property (nonatomic , readonly) TTextBox *(^mulY)(int ymul);@property (nonatomic , readonly) TTextBox *(^width)(int w);@property (nonatomic , readonly) TTextBox *(^lineSpace)(int space);@property (nonatomic , readonly) TTextBox *(^isBold)(BOOL bold);@property (nonatomic , readonly) TTextBox *(^content)(NSString * cnt);@endTTextBox.m — TEXTBOX
@interface TTextBox()@property (nonatomic , assign) int startX;@property (nonatomic , assign) int startY;@property (nonatomic , assign) TFont fnt;@property (nonatomic , assign) TRotation rot;@property (nonatomic , assign) BOOL rType;@property (nonatomic , assign) int xmul;@property (nonatomic , assign) int ymul;@property (nonatomic , assign) int w;@property (nonatomic , assign) int ls;@property (nonatomic , assign) BOOL bold;@property (nonatomic , strong) NSString * cnt;@end@endTSPLCodeType.h
@interface TSPLCodeType : NSObject@property (nonatomic , readonly) TSPLCodeType *(^codeType)(TCodeType type);-(NSString *)getCodeType;@endTSPLCodeType.m
@interface TSPLCodeType ()@property (nonatomic , assign) TCodeType type;@end@endTSPLCorrectLevel.h
@interface TSPLCorrectLevel : NSObject@property(nonatomic , assign)TCorrectLevel level;-(NSString *)getLevel;@endTSPLFont.h
@interface TSPLFont : NSObject@property(nonatomic , readonly)TSPLFont *(^font)(TFont fnt);- (int) getEx;- (int) getEy;- (int) getFamily;- (int) getSize;- (int) getHeight;@endTSPLFont.m
@interface TSPLFont()@property (nonatomic , assign)TFont fnt;@property (nonatomic , assign)int ex;@property (nonatomic , assign)int ey;@property (nonatomic , assign)int family;@property (nonatomic , assign)int size;@property (nonatomic , assign)int height;@end@endTSPLImageMode.h
@interface TSPLImageMode : NSObject@property (nonatomic , readonly) TSPLImageMode *(^mode)(TImageMode imagemode);-(int)getMode;@endTSPLImageMode.m
@interface TSPLImageMode()@property (nonatomic , assign) TImageMode imageMode;@end@endTSPLLineMode.h
@interface TSPLLineMode : NSObject@property (nonatomic , readonly) TSPLLineMode *(^line)(TLineMode linem);-(NSString *)getLine;@endTSPLLineMode.m
@interface TSPLLineMode()@property (nonatomic , assign) TLineMode linem;@end@endTSPLLineType.h
@interface TSPLLineType : NSObject@property(nonatomic , readonly) TSPLLineType *(^lineType)(TLineType l);-(int) getLine;@endTSPLLineType.m
@interface TSPLLineType()@property (nonatomic , assign) TLineType l;@end@endTSPLRotation.h
@interface TSPLRotation : NSObject@property(nonatomic , readonly) TSPLRotation *(^rotation)(TRotation rot);-(int)getRotation;@endTSPLRotation.m
@interface TSPLRotation()@property(nonatomic , assign) TRotation rot;@end@endTSPLShowType.h
@interface TSPLShowType : NSObject@property(nonatomic , readonly) TSPLShowType *(^showType)(TShowType stypevoid);;-(int)getShowType;@endTSPLShowType.m
@interface TSPLShowType()@property(nonatomic , assign) TShowType sType;@end@endauto_dot.rs — SETC AUTODOTTED
pub struct TAutoDotOptions { pub enable: bool,pub struct TAutoDot { pub fn new(options: TAutoDotOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<bool> for TAutoDot { fn from(enable: bool) -> Self {bar.rs — BAR
pub struct TBarOptions { pub x: i32, pub y: i32, pub width: i32, pub height: i32, pub line: Line,pub struct TBar { pub fn new(options: TBarOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32)> for TBar { fn from((x, y, width, height): (i32, i32, i32, i32)) -> Self {bar_code.rs — BARCODE
pub struct TBarCodeOptions { pub x: i32, pub y: i32, pub height: i32, pub code_type: Option<CodeType>, pub show_type: Option<ShowType>, pub rotation: Option<Rotation>, pub cell_width: i32, pub ratio: Option<i32>, pub content: String,pub struct TBarCode { pub fn new(options: TBarCodeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<T: Into<String>> From<(i32, i32, i32, i32, T)> for TBarCode { fn from((x, y, height, cell_width, content): (i32, i32, i32, i32, T)) -> Self {battery_volume.rs — READC BATTERY_LEVEL
pub struct TBatteryVolume { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TBatteryVolume { fn context(&self) -> Arc<Mutex<ArgContext>> {black.rs — SETCOLOR BLACK
pub struct TBlack { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TBlack { fn context(&self) -> Arc<Mutex<ArgContext>> {bline.rs — BLINE
pub struct TBlineOptions { pub height: Option<i32>, pub offset: Option<i32>,pub struct TBline { pub fn new(options: TBlineOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TBline { fn default() -> Self {box_.rs — BOX
pub struct TBoxOptions { pub start_x: i32, pub start_y: i32, pub end_x: i32, pub end_y: i32, pub width: i32, pub radius: Option<i32>,pub struct TBox { pub fn new(options: TBoxOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32, i32, i32)> for TBox { fn from((start_x, start_y, end_x, end_y, width, radius): (i32, i32, i32, i32, i32, i32)) -> Self {circle.rs — CIRCLE
pub struct TCircleOptions { pub x: i32, pub y: i32, pub width: i32, pub radius: i32,pub struct TCircle { pub fn new(options: TCircleOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32)> for TCircle { fn from((x, y, width, radius): (i32, i32, i32, i32)) -> Self {clean_bmp_flash.rs — BMPDELETE
pub struct TCleanBmpFlashOptions { pub index: i32,pub struct TCleanBmpFlash { pub fn new(options: TCleanBmpFlashOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TCleanBmpFlash { fn context(&self) -> Arc<Mutex<ArgContext>> {cls.rs — CLS
pub struct TCls { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TCls { fn context(&self) -> Arc<Mutex<ArgContext>> {continuous.rs — GAP
pub struct TContinuousOptions { pub height: Option<i32>, pub offset: Option<i32>,pub struct TContinuous { pub fn new(options: TContinuousOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TContinuous { fn default() -> Self {cut.rs — SET CUTTER
pub struct TCutOptions { pub enable: bool,pub struct TCut { pub fn new(options: TCutOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TCut { fn context(&self) -> Arc<Mutex<ArgContext>> {density.rs — DENSITY
pub struct TDensityOptions { pub density: i32,pub struct TDensity { pub fn new(options: TDensityOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TDensity { fn context(&self) -> Arc<Mutex<ArgContext>> {direction.rs — DIRECTION
pub struct TDirectionOptions { pub direction: Direction, pub mirror: bool,pub struct TDirection { pub fn new(options: TDirectionOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TDirection { fn default() -> Self {dmatrix.rs — DMATRIX
pub struct TDmatrixOptions { pub x: i32, pub y: i32, pub width: i32, pub height: i32, pub content: String,pub struct TDmatrix { pub fn new(options: TDmatrixOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<C: Into<String>> From<(i32, i32, i32, i32, C)> for TDmatrix { fn from((x, y, width, height, content): (i32, i32, i32, i32, C)) -> Self {ellipse.rs — ELLIPSE
pub struct TEllipseOptions { pub x: i32, pub y: i32, pub width: i32, pub height: i32, pub thickness: i32,pub struct TEllipse { pub fn new(options: TEllipseOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32, i32)> for TEllipse { fn from((x, y, width, height, thickness): (i32, i32, i32, i32, i32)) -> Self {gap.rs — SET GAP
pub struct TGapOptions { pub enable: bool,pub struct TGap { pub fn new(options: TGapOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TGap { fn context(&self) -> Arc<Mutex<ArgContext>> {gbk_code.rs — CODEPAGE 936
pub struct TGBKCode { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TGBKCode { fn context(&self) -> Arc<Mutex<ArgContext>> {get_ribbon_end.rs — DIAGNOSTIC REPORT RIBBONEND
pub struct TGetRibbonEnd { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TGetRibbonEnd { fn context(&self) -> Arc<Mutex<ArgContext>> {image_bytes.rs
pub struct TImageBytesOptions { pub x: i32, pub y: i32, pub bytes: Vec<u8>, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth, pub image_mode: TImageMode,pub struct TImageBytes { pub fn new(options: TImageBytesOptions) -> PsdkFatherResult<Self> { let pixmap = Pixmap::decode_png(&options.bytes).map_err(|e| PsdkFatherError::Image(format!("{:?}", e)))?; let width = pixmap.width();image_pixels.rs — BITMAP
pub struct TImagePixelsOptions { pub x: i32, pub y: i32, pub pixels: Vec<u8>, pub width: u32, pub height: u32, pub compress: bool, pub reverse: bool, pub gray_threshold: Option<i32>, pub smooth_weight: i32, pub edge_dither_mode: Option<ThresholdEdgeDitherMode>, pub edge_dither_depth: ThresholdEdgeDitherDepth, pub image_mode: TImageMode,pub struct TImagePixels { pub fn new(options: TImagePixelsOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, Vec<u8>, u32, u32)> for TImagePixels { fn from((x, y, pixels, width, height): (i32, i32, Vec<u8>, u32, u32)) -> Self {label.rs — GAP
pub struct TLabelOptions { pub height: Option<i32>, pub offset: Option<i32>,pub struct TLabel { pub fn new(options: TLabelOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TLabel { fn default() -> Self {learn_paper_gap.rs — GAPDETECT
pub struct TLearnPaperGap { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TLearnPaperGap { fn context(&self) -> Arc<Mutex<ArgContext>> {line.rs — LINE
pub struct TLineOptions { pub start_x: i32, pub start_y: i32, pub end_x: i32, pub end_y: i32, pub width: i32, pub line: Option<LineM>,pub struct TLine { pub fn new(options: TLineOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32, i32)> for TLine { fn from((start_x, start_y, end_x, end_y, width): (i32, i32, i32, i32, i32)) -> Self {mddle.rs — READC MDDLE
pub struct TMddle { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TMddle { fn context(&self) -> Arc<Mutex<ArgContext>> {models.rs — OUT GETSETTING$(\ / ,\ / )
pub struct TModels { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TModels { fn context(&self) -> Arc<Mutex<ArgContext>> {offset.rs — OFFSET
pub struct TOffsetOptions { pub offset: i32,pub struct TOffset { pub fn new(options: TOffsetOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TOffset { fn default() -> Self {page.rs — SIZE
pub struct TPageOptions { pub width: i32, pub height: i32,pub struct TPage { pub fn new(options: TPageOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32)> for TPage { fn from((width, height): (i32, i32)) -> Self {peel.rs — SET PEEL
pub struct TPeelOptions { pub enable: bool,pub struct TPeel { pub fn new(options: TPeelOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TPeel { fn default() -> Self {print.rs — PRINT
pub struct TPrintOptions { pub copies: i32,pub struct TPrint { pub fn new(options: TPrintOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TPrint { fn default() -> Self {put_image.rs — PUTBMP
pub struct TPutImageOptions { pub x: i32, pub y: i32, pub file_name: String,pub struct TPutImage { pub fn new(options: TPutImageOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<F: Into<String>> From<(i32, i32, F)> for TPutImage { fn from((x, y, file_name): (i32, i32, F)) -> Self {qr_code.rs — QRCODE
pub struct TQRCodeOptions { pub x: i32, pub y: i32, pub cell_width: i32, pub rotation: Option<Rotation>, pub ecc_level: Option<ECCLevel>, pub version: Option<String>, pub content: String,pub struct TQRCode { pub fn new(options: TQRCodeOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<C: Into<String>, V: Into<String>> From<(i32, i32, i32, C, V)> for TQRCode { fn from((x, y, cell_width, content, version): (i32, i32, i32, C, V)) -> Self {read_hardware_version.rs — READC HW_VERSION
pub struct TReadHardwareVersion { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TReadHardwareVersion { fn context(&self) -> Arc<Mutex<ArgContext>> {read_state.rs — READSTA
pub struct TReadState { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TReadState { fn context(&self) -> Arc<Mutex<ArgContext>> {red.rs — SETCOLOR RED
pub struct TRedOptions { pub density: i32,pub struct TRed { pub fn new(options: TRedOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TRed { fn context(&self) -> Arc<Mutex<ArgContext>> {reference.rs — REFERENCE
pub struct TReferenceOptions { pub horizontal: Option<i32>, pub vertical: Option<i32>,pub struct TReference { pub fn new(options: TReferenceOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TReference { fn default() -> Self {reset_factory.rs — RESET FACTORY
pub struct TResetFactory { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TResetFactory { fn context(&self) -> Arc<Mutex<ArgContext>> {reverse.rs — REVERSE
pub struct TReverseOptions { pub x: i32, pub y: i32, pub height: i32, pub width: i32,pub struct TReverse { pub fn new(options: TReverseOptions) -> Self { Self { options, ctx: Default::default(), } }}impl From<(i32, i32, i32, i32)> for TReverse { fn from((x, y, height, width): (i32, i32, i32, i32)) -> Self {ribbon.rs — SET RIBBON
pub struct TRibbonOptions { pub enable: bool,pub struct TRibbon { pub fn new(options: TRibbonOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TRibbon { fn default() -> Self {set_ribbon_end.rs — SET RIBBONEND
pub struct TSetRibbonEndOptions { pub enable: bool,pub struct TSetRibbonEnd { pub fn new(options: TSetRibbonEndOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TSetRibbonEnd { fn context(&self) -> Arc<Mutex<ArgContext>> {shift.rs — SHIFT
pub struct TShiftOptions { pub shift: i32,pub struct TShift { pub fn new(options: TShiftOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TShift { fn default() -> Self {sn.rs — READC PRDOCUTID
pub struct TSN { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TSN { fn context(&self) -> Arc<Mutex<ArgContext>> {sns.rs — OUT GETSETTING$(\ / ,\ / )
pub struct TSNs { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TSNs { fn context(&self) -> Arc<Mutex<ArgContext>> {speed.rs — SPEED
pub struct TSpeedOptions { pub speed: i32,pub struct TSpeed { pub fn new(options: TSpeedOptions) -> Self { Self { options, ctx: Default::default(), } }}impl PsdkEasyArg<String> for TSpeed { fn context(&self) -> Arc<Mutex<ArgContext>> {status.rs — 1B 21 3F
pub struct TStatus { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<Vec<u8>> for TStatus { fn context(&self) -> Arc<Mutex<ArgContext>> {tear.rs — SET TEAR
pub struct TTearOptions { pub enable: bool,pub struct TTear { pub fn new(options: TTearOptions) -> Self { Self { options, ctx: Default::default(), } }}impl Default for TTear { fn default() -> Self {text.rs — TEXT
pub struct TTextOptions { pub x: i32, pub y: i32, pub content: String, pub font: Option<Font>, pub raw_font: Option<String>, pub rotation: Option<Rotation>, pub x_multi: Option<i32>, pub y_multi: Option<i32>, pub bold: Option<bool>, pub alignment: Option<Alignment>,pub struct TText { pub fn new(options: TTextOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<T: Into<String>> From<(i32, i32, i32, i32, bool, T)> for TText { fn from((x, y, x_multi, y_multi, bold, content): (i32, i32, i32, i32, bool, T)) -> Self {text_box.rs — TEXTBOX
pub struct TTextBoxOptions { pub x: i32, pub y: i32, pub content: String, pub width: i32, pub font: Option<Font>, pub rotation: Option<Rotation>, pub x_multi: Option<i32>, pub y_multi: Option<i32>, pub line_space: i32, pub rotation_type: bool, pub bold: Option<bool>,pub struct TTextBox { pub fn new(options: TTextBoxOptions) -> Self { Self { options, ctx: Default::default(), } }}impl<T: Into<String>> From<(i32, i32, i32, i32, i32, i32, bool, T)> for TTextBox { fn from( (x, y, x_multi, y_multi, width, line_space, bold, content): ( i32, i32, i32, i32, i32, i32, bool, T, ), ) -> Self {utf8_code.rs — CODEPAGE UTF-8
pub struct TUTF8Code { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TUTF8Code { fn context(&self) -> Arc<Mutex<ArgContext>> {version.rs — READC VERSION
pub struct TVersion { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TVersion { fn context(&self) -> Arc<Mutex<ArgContext>> {versions.rs — OUT GETSETTING$(\ / ,\ / )
pub struct TVersions { pub fn new() -> Self { Self { ctx: Default::default(), } }}impl PsdkEasyArg<String> for TVersions { fn context(&self) -> Arc<Mutex<ArgContext>> {marks.rs
pub enum Line {pub enum CodeType {pub enum ShowType {pub enum Rotation {pub enum Direction {pub enum LineM {pub enum ECCLevel {pub enum Font {pub enum Alignment {pub enum TImageMode {TBar.swift — BAR
public class TBar: EasyArg<String> { public required init(_ raw: TRealBar) { public static func build(_ block: () -> TRealBar) -> Self { Self.init(block()) }}public class TRealBar: IEasyStringArg { public var startX: Int public var startY: Int public var endX: Int public var endY: Int public var width: Int public var height: Int public var lineType: TLineType public init( startX: Int, startY: Int, endX: Int, endY: Int, width: Int, height: Int, lineType: TLineType ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(endX) .append(endY) .append(width) .append(height) .append(lineType.rawValue) .clause() } public func header() -> CommandDataType { "BAR" } public func derived() -> DeriveArg<String>? { nil }}TBarCode.swift — BARCODE
public class TBarCode:EasyArg<String> { public required init(_ raw: TRealBarCode) { public static func build(_ block: () -> TRealBarCode) -> Self { Self.init(block()) }}public class TRealBarCode: IEasyStringArg { public var startX: Int public var startY: Int public var codeType = TCodeType.CODE_128 public var height: Int public var displayType = TDisplayType.NONE public var rotation = TRotation.ROTATE_0 public var cellwidth: Int public var content: String public init( startX: Int, startY: Int, codeType: TCodeType, height: Int, displayType: TDisplayType, rotation: TRotation, cellwidth: Int, content: String ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(codeType.rawValue) .append(height) .append(displayType.rawValue) .append(rotation.rawValue) .append(cellwidth) .append(content) .clause() } public func header() -> String { "BARCODE" } public func derived() -> DeriveArg<String>? { nil }}TBatteryVolume.swift
public class TBatteryVolume: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class TRealBatteryVolume: IEasyOnlyStringHeaderArg {TBox.swift — BOX
public class TBox: EasyArg<String> { public required init(_ raw: TRealBox) { public static func build(_ block: () -> TRealBox) -> Self { Self.init(block()) }}public class TRealBox: IEasyStringArg { public var startX: Int public var startY: Int public var endX: Int public var endY: Int public var width: Int public var radius: Int public init( startX: Int, startY: Int, endX: Int, endY: Int, width: Int, radius: Int ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(endX) .append(endY) .append(width) .append(radius) .clause() } public func header() -> String { "BOX" } public func derived() -> DeriveArg<String>? { nil }}TCircle.swift — CIRCLE
public class TCircle: EasyArg<String> { public required init(_ raw: TRealCircle) { public static func build(_ block: () -> TRealCircle) -> Self { Self.init(block()) }}public class TRealCircle: IEasyStringArg { public var startX: Int public var startY: Int public var width: Int public var radius: Int public init( startX: Int, startY: Int, width: Int, radius: Int ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(width) .append(radius) .clause() } public func header() -> String { "CIRCLE" } public func derived() -> DeriveArg<String>? { nil }}TClear.swift — CLS
public class TClear: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class TRealClear: IEasyOnlyStringHeaderArg {TCut.swift — SET CUTTER
public class TCut: EasyArg<String> { public required init(_ raw: TRealCut) { public static func build(_ block: () -> TRealCut) -> Self { Self.init(block()) }}public class TRealCut: IEasyStringArg { public var isCut: Bool public init(isCut: Bool) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(isCut ? "1" : "OFF") .clause() } public func header() -> String { "SET CUTTER" } public func derived() -> DeriveArg<String>? { nil }}TDensity.swift — DENSITY
public class TDensity: EasyArg<String> { public required init(_ raw: TRealDensity) { public static func build(_ block: () -> TRealDensity) -> Self { Self.init(block()) }}public class TRealDensity: IEasyStringArg { public var density: Int public init(density: Int) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(density) .clause() } public func header() -> CommandDataType { "DENSITY" } public func derived() -> DeriveArg<String>? { nil }}TDirection.swift — DIRECTION
public class TDirection: EasyArg<String> { public required init(_ raw: TRealDirection) { public static func build(_ block: () -> TRealDirection) -> Self { Self.init(block()) }}public class TRealDirection: IEasyStringArg { public var isMirror: Bool = false public var direction: TOutDirection = .UP_OUT public init( isMirror: Bool, direction: TOutDirection ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(direction.rawValue) .append(isMirror ? "1" : "0") .clause() } public func header() -> String { "DIRECTION" } public func derived() -> DeriveArg<String>? { nil }}TDmatrix.swift — DMATRIX
public class TDmatrix: EasyArg<String> { public required init(_ raw: TRealDmatrix) { public static func build(_ block: () -> TRealDmatrix) -> Self { Self.init(block()) }}public class TRealDmatrix: IEasyStringArg { public var startX: Int public var startY: Int public var width: Int public var height: Int public var content: String public init( startX: Int, startY: Int, width: Int, height: Int, content: String ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(width) .append(height) .append(TextAppendat.create(content)) .clause() } public func header() -> CommandDataType { "DMATRIX" } public func derived() -> DeriveArg<String>? { nil }}TGap.swift — SET GAP
public class TGap: EasyArg<String> { public required init(_ raw: TRealGap) { public static func build(_ block: () -> TRealGap) -> Self { Self.init(block()) }}public class TRealGap: IEasyStringArg { public var enable: Bool public init(enable: Bool) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(enable ? "ON" : "OFF") .clause() } public func header() -> CommandDataType { "SET GAP" } public func derived() -> DeriveArg<String>? { nil }}TImage.swift — BITMAP
public class TImage: EasyArg<String> { public required init(_ raw: TRealImage) { public static func build(_ block: () -> TRealImage) -> Self { Self.init(block()) }}public class TRealImage: IEasyStringArg { public var startX: Int public var startY: Int public var width: Int public var height: Int public var image: Data public var compress: Bool public var mode: ImageMode = .OVERWRITE public init( startX: Int, startY: Int, width: Int, height: Int, image: Data, compress: Bool, mode: ImageMode ) { public func header() -> String { "BITMAP" } public func clause() -> CommandClause { let byteWidth: Int = (width % 8 == 0) ? (width / 8) : (width / 8 + 1) let commander = Commander.make() let tsplCommand = TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(byteWidth) .append(height) if compress { let _ = tsplCommand.append("3").append(image.count) let _ = commander.push(tsplCommand.clause(), newline: false) .push(",", newline: false) .push(image, newline: false) } else { let _ = tsplCommand.append(mode.rawValue) let _ = commander.push(tsplCommand.clause(), newline: false) .push(",", newline: false) .push(image, newline: false) } return Raw.command(commander.command().binary()).clause() } public func derived() -> DeriveArg<String>? { nil }}TLine.swift — LINE
public class TLine: EasyArg<String> { public required init(_ raw: TRealLine) { public static func build(_ block: () -> TRealLine) -> Self { Self.init(block()) }}public class TRealLine: IEasyStringArg { public var startX: Int public var startY: Int public var endX: Int public var endY: Int public var width: Int public var height: Int public var mode: TLineMode public init( startX: Int, startY: Int, endX: Int, endY: Int, width: Int, height: Int, mode: TLineMode ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(endX) .append(endY) .append(width) .append(height) .append(TextAppendat.create(mode.value() ?? "")) .clause() } public func header() -> CommandDataType { "LINE" } public func derived() -> DeriveArg<String>? { nil }}TMddle.swift — READC MDDLE
public class TMddle: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}public class TRealMddle: IEasyOnlyStringHeaderArg { public func header() -> String { "READC MDDLE" } public func derived() -> DeriveArg<String>? { nil }}TPage.swift — SIZE
public class TPage: EasyArg<String> { public required init(_ raw: TRealPage) { public static func build(_ block: () -> TRealPage) -> Self { Self.init(block()) }}public class TRealPage: IEasyStringArg { public var width: Int public var height: Int public init( width: Int, height: Int ) { public func header() -> String { "SIZE" } public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(String(width) + " mm") .append(String(height) + " mm") .clause() } public func derived() -> DeriveArg<String>? { nil }}TPrint.swift — PRINT
public class TPrint: EasyArg<String> { public required init(_ raw: TRealPrint) { public static func build(_ block: () -> TRealPrint) -> Self { Self.init(block()) }}public class TRealPrint: IEasyStringArg { public var copies: Int public init(copies: Int) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append("1") .append(copies) .clause() } public func header() -> CommandDataType { "PRINT" } public func derived() -> DeriveArg<String>? { nil }}TQRCode.swift — QRCODE
public class TQRCode: EasyArg<String> { public required init(_ raw: TRealQRCode) { public static func build(_ block: () -> TRealQRCode) -> Self { Self.init(block()) }}public class TRealQRCode: IEasyStringArg { public var startX: Int public var startY: Int public var correctLevel: CorrectLevel = .L public var rotation: TRotation = .ROTATE_0 public var cellWidth: Int public var content: String public var version: String public init( startX: Int, startY: Int, cellWidth: Int, content: String, version: String ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(correctLevel.rawValue) .append(cellWidth) .append("A") .append(rotation.rawValue) .append("M2") .append("S7") .append(TextAppendat.create("V" + version)) .append(TextAppendat.create(content).quote()) .clause() } public func header() -> CommandDataType { "QRCODE" } public func derived() -> DeriveArg<String>? { nil }}TReadState.swift — READSTA
public class TReadState: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class TRealReadState: IEasyOnlyStringHeaderArg {TSN.swift — READC PRODUCTID
public class TSN: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class TRealSN: IEasyOnlyStringHeaderArg {TSpeed.swift — SPEED
public class TSpeed: EasyArg<String> { public required init(_ raw: TRealSpeed) { public static func build(_ block: () -> TRealSpeed) -> Self { Self.init(block()) }}public class TRealSpeed: IEasyStringArg { public var speed: Int public init(speed: Int) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(speed) .clause() } public func header() -> CommandDataType { "SPEED" } public func derived() -> DeriveArg<String>? { nil }}TText.swift — TEXT
public class TText: EasyArg<String> { public required init(_ raw: TRealText) { public static func build(_ block: () -> TRealText) -> Self { Self.init(block()) }}public class TRealText: IEasyStringArg { public var startX: Int public var startY: Int public var font: Font = .TSS16 public var rotation: TRotation = .ROTATE_0 public var xmulti: Int public var ymulti: Int public var isBold: Bool public var content: String public init( startX: Int, startY: Int, xmulti: Int, ymulti: Int, isBold: Bool, content: String, font: Font, rotation: TRotation ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(TextAppendat.create(font.rawValue).quote()) .append(rotation.rawValue) .append(xmulti) .append(ymulti) .append(TextAppendat.create("B1", condition: isBold)) .append(TextAppendat.create(content).quote()) .clause() } public func header() -> CommandDataType { "TEXT" } public func derived() -> DeriveArg<String>? { nil }}TTextBox.swift — TEXTBOX
public class TTextBox: EasyArg<String> { public required init(_ raw: TRealTextBox) { public static func build(_ block: () -> TRealTextBox) -> Self { Self.init(block()) }}public class TRealTextBox: IEasyStringArg { public var startX: Int public var startY: Int public var font: Font = .TSS16 public var rotation: TRotation = .ROTATE_90 public var rotationType: Bool = false //false: 旋转每一个字 true:整体旋转 public var xmulti: Int public var ymulti: Int public var width: Int public var linespace: Int //行间距 public var isBold: Bool public var content: String public init( startX: Int, startY: Int, xmulti: Int, ymulti: Int, width: Int, linespace: Int, isBold: Bool, content: String ) { public func clause() -> CommandClause { TSPLCommand.with(header: header()) .append(startX) .append(startY) .append(TextAppendat.create(font.rawValue).quote()) .append(rotation.rawValue) .append(xmulti) .append(ymulti) .append(width) .append(TextAppendat.create("L" + String(linespace), condition: linespace > 0)) .append(TextAppendat.create("B1", condition: isBold)) .append(TextAppendat.create("D" + rotation.rawValue, condition: rotationType)) .append(TextAppendat.create(content).quote()) .clause() } public func header() -> CommandDataType { "TEXTBOX" } public func derived() -> DeriveArg<String>? { nil }}TVersion.swift — READC VERSION
public class TVersion: OnlyStringHeaderArg { public required init() { public static func build() -> Self { Self.init() }}class TRealVersion: IEasyOnlyStringHeaderArg {mark.swift
public enum TLineMode { public func value() -> String? { switch self { case .SOLID: return nil case .DOTTED_M1: return "M1" case .DOTTED_M2: return "M2" case .DOTTED_M3: return "M3" case .DOTTED_M4: return "M4" } }}public enum TLineType: String {public enum TRotation: String {public enum TCodeType: String {public enum TDisplayType: Int {public enum TOutDirection: Int {public enum CorrectLevel: String {public enum Font: String {public enum ImageMode: Int {