# TscCommand Class Reference

Inherits from | NSObject
Declared in | TscCommand.h TscCommand.m

## Overview

TSC指令类，调用其类方法可返回Nsdata类型的数据，用于发送，此类只适用于TSC打印机

### `+ sizeBymmWithWidth:andHeight:`

this command defines the label width and lenth 设定标签纸的宽度及长度 SIZE m mm,n mm 单位 mm

`+ (NSData *)sizeBymmWithWidth:(double)m andHeight:(double)n`

#### Parameters

`m` | label width
`n` | label length @discussion

#### Discussion

this command defines the label width and lenth 设定标签纸的宽度及长度 SIZE m mm,n mm 单位 mm

#### Declared In

`TscCommand.h`

### `+ sizeBydotWithWidth:andHeight:`

this command defines the label width and lenth 设定标签纸的宽度及高度 SIZE m ,n 单位 dot

`+ (NSData *)sizeBydotWithWidth:(int)m andHeight:(int)n`

#### Parameters

`m` | label width
`n` | label length

#### Discussion

this command defines the label width and lenth 设定标签纸的宽度及高度 SIZE m ,n 单位 dot

#### Declared In

`TscCommand.h`

### `+ sizeByinchWithWidth:andHeight:`

this command defines the label width and lenth 设定标签纸的宽度及长度 SIZE m ,n 单位 inch

`+ (NSData *)sizeByinchWithWidth:(double)m andHeight:(double)n`

#### Parameters

`m` | label width
`n` | label length

#### Discussion

this command defines the label width and lenth 设定标签纸的宽度及长度 SIZE m ,n 单位 inch

#### Declared In

`TscCommand.h`

### `+ gapBymmWithWidth:andHeight:`

this command defines the gap distance between to labels 设置标签纸的垂直间距 GAP m mm,n mm 单位 mm

`+ (NSData *)gapBymmWithWidth:(double)m andHeight:(double)n`

#### Parameters

`m` | the gap distance between two labels
`n` | the offset distance of the gap

#### Discussion

this command defines the gap distance between to labels 设置标签纸的垂直间距 GAP m mm,n mm 单位 mm

#### Declared In

`TscCommand.h`

### `+ gapBydotWithWidth:andHeight:`

this command defines the gap distance between to labels 设置标签纸的间距 GAP m,n 单位 dot

`+ (NSData *)gapBydotWithWidth:(int)m andHeight:(int)n`

#### Parameters

`m` | the gap distance between two labels
`n` | the offset distance of the gap

#### Discussion

this command defines the gap distance between to labels 设置标签纸的间距 GAP m,n 单位 dot

#### Declared In

`TscCommand.h`

### `+ gapByinchWithWidth:andHeight:`

this command defines the gap distance between to labels 设置标签纸的间距 GAP m,n 单位 inch

`+ (NSData *)gapByinchWithWidth:(double)m andHeight:(double)n`

#### Parameters

`m` | the gap distance between two labels
`n` | the offset distance of the gap

#### Discussion

this command defines the gap distance between to labels 设置标签纸的间距 GAP m,n 单位 inch

#### Declared In

`TscCommand.h`

### `+ gapDetect`

this command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes,respectively.

`+ (NSData *)gapDetect`

#### Discussion

this command feeds the paper through the gap sensor in an effort to determine the paper and gap sizes,respectively.

GAPDETECT

(

#### Declared In

`TscCommand.h`

### `+ gapDetectWithX:andY:`

this command feeds the paper throught the gap sensor in an effort to determine the paper and gap sizes,respectively.

`+ (NSData *)gapDetectWithX:(int)x andY:(int)y`

#### Parameters

`x` | paper length（in dots）
`y` | gap length(in dots)

#### Discussion

this command feeds the paper throught the gap sensor in an effort to determine the paper and gap sizes,respectively.

GAPDETECT x,y 单位 （dot）

#### Declared In

`TscCommand.h`

### `+ blinedDetectWithX:andY:`

this command feeds the paper through the black mark sensor in an effort to the determine the paper and black mark size. BLINEDDETECT X,Y

`+ (NSData *)blinedDetectWithX:(int)x andY:(int)y`

#### Parameters

`x` | paper lenght(in dots)
`y` | gap lenght(in dots)

#### Discussion

this command feeds the paper through the black mark sensor in an effort to the determine the paper and black mark size. BLINEDDETECT X,Y

#### Declared In

`TscCommand.h`

### `+ autoDetectWithX:andY:`

this command feeds the paper through the gap/black mark sensor in an effort to deternine the paper and gap/black mark size. AUTODETECT X,Y

`+ (NSData *)autoDetectWithX:(int)x andY:(int)y`

#### Parameters

`x` | paper length(in dots)
`y` | gap length(in dots)

#### Discussion

this command feeds the paper through the gap/black mark sensor in an effort to deternine the paper and gap/black mark size. AUTODETECT X,Y

#### Declared In

`TscCommand.h`

### `+ blineBymmWithM:andN:`

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N 单位 inch

`+ (NSData *)blineBymmWithM:(double)m andN:(double)n`

#### Parameters

`m` | the height of black line in inch
`n` | the extra label feeding length

#### Discussion

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N 单位 inch

#### Declared In

`TscCommand.h`

### `+ blineByinchWithM:andN:`

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N 单位 inch

`+ (NSData *)blineByinchWithM:(double)m andN:(double)n`

#### Parameters

`m` | the height of black line in mm
`n` | the extra label feeding length

#### Discussion

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N 单位 inch

#### Declared In

`TscCommand.h`

### `+ blineBydotWithM:andN:`

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N

`+ (NSData *)blineBydotWithM:(int)m andN:(int)n`

#### Parameters

`m` | the height of black line either in dot
`n` | the extra label feeding length

#### Discussion

this command sets the height of the black line and the user-defined extra label feeding length each from feed takes. 设定黑标的高度及偏移位置 BLINE M,N

#### Declared In

`TscCommand.h`

### `+ offSetBymmWithM:`

this command sets the position of label under the pee-off mode. OFFSET m mm 剥离模式下，控制每张标签停止的位置 单位 mm

`+ (NSData *)offSetBymmWithM:(double)m`

#### Parameters

`m` | the offset distance(in mm)

#### Discussion

this command sets the position of label under the pee-off mode. OFFSET m mm 剥离模式下，控制每张标签停止的位置 单位 mm

#### Declared In

`TscCommand.h`

### `+ offSetByinchWithM:`

this command sets the position of label under the pee-off mode. OFFSET m 剥离模式下，控制每张标签停止的位置 单位 inch

`+ (NSData *)offSetByinchWithM:(double)m`

#### Parameters

`m` | the offset distance(in inch)

#### Discussion

this command sets the position of label under the pee-off mode. OFFSET m 剥离模式下，控制每张标签停止的位置 单位 inch

#### Declared In

`TscCommand.h`

### `+ offSetBydotWithM:`

this command sets the position of label under the pee-off mode. OFFSET m mm 剥离模式下，控制每张标签停止的位置 单位 dot

`+ (NSData *)offSetBydotWithM:(int)m`

#### Parameters

`m` | the offset distance(in dots)

#### Discussion

this command sets the position of label under the pee-off mode. OFFSET m mm 剥离模式下，控制每张标签停止的位置 单位 dot

#### Declared In

`TscCommand.h`

### `+ speed:`

this command defines the print speed SPEED N 设置走纸速度

`+ (NSData *)speed:(double)n`

#### Parameters

`n` | printing speed in inch per second

#### Discussion

this command defines the print speed SPEED N 设置走纸速度

#### Declared In

`TscCommand.h`

### `+ density:`

this command sets the printing daekesss DENSITY n

`+ (NSData *)density:(int)n`

#### Parameters

`n` | specifiles the lightest/darkest level

#### Discussion

this command sets the printing daekesss DENSITY n

#### Declared In

`TscCommand.h`

### `+ direction:`

this command defines the printout direction and mirror image.this will be stored in the printermemory. 定义打印时出纸方向 DIRECTION n

`+ (NSData *)direction:(int)n`

#### Parameters

`n` | 0 or 1,please refer to the illustrations below.

#### Discussion

this command defines the printout direction and mirror image.this will be stored in the printermemory. 定义打印时出纸方向 DIRECTION n

#### Declared In

`TscCommand.h`

### `+ referenceWithX:andY:`

this command defines the reference point the of the label.the referce (origin) point varies with the print direction,as shown. 用于定义标签的参考坐标原点 REFERENCE x,y

`+ (NSData *)referenceWithX:(int)x andY:(int)y`

#### Parameters

`x` | Horizontal coordinate(in dots).
`y` | Vertical coordinate (in dots).

#### Discussion

this command defines the reference point the of the label.the referce (origin) point varies with the print direction,as shown. 用于定义标签的参考坐标原点 REFERENCE x,y

#### Declared In

`TscCommand.h`

### `+ shift:`

this command moves the label’s vertical position. SHIFT n

`+ (NSData *)shift:(int)n`

#### Parameters

`n` | the maximum calue is 1 inch.for 200 dpi printers,this range is -203 to 203;for 300 dpi printers,the range is -300 to 300.this unit is dot.

#### Discussion

this command moves the label’s vertical position. SHIFT n

#### Declared In

`TscCommand.h`

### `+ country:`

this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). 用于选择国际字符集

`+ (NSData *)country:(NSString *)countryCoding`

#### Parameters

`countryCoding` | the keyboard for use in different countries via defining special characters

#### Discussion

this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). 用于选择国际字符集

#### Declared In

`TscCommand.h`

### `+ codePage:`

this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). 指定字符编码 CODEPAE n

`+ (NSData *)codePage:(NSString *)str`

#### Parameters

`str` | the name of codepage;

#### Discussion

this command orients the keyboard for use in different countries via defining special characters on the KP-200 series portable LCD keyboard (option). 指定字符编码 CODEPAE n

#### Declared In

`TscCommand.h`

### `+ cls`

this command clears the iamge buffer. 清除缓存 CLS

`+ (NSData *)cls`

#### Discussion

this command clears the iamge buffer. 清除缓存 CLS

#### Declared In

`TscCommand.h`

### `+ feed:`

this command feeds label with the specified length. the length is specified by dot. 控制进纸距离，单位dot FEED n

`+ (NSData *)feed:(int)n`

#### Parameters

`n` | the length label feeds.

#### Discussion

this command feeds label with the specified length. the length is specified by dot. 控制进纸距离，单位dot FEED n

#### Declared In

`TscCommand.h`

### `+ backFeed:`

this command feeds the label in reverse.the length is specified by dot. BACKFEED n n的单位 dot

`+ (NSData *)backFeed:(int)n`

#### Parameters

`n` | the length babel feeds in reverse.

#### Discussion

this command feeds the label in reverse.the length is specified by dot. BACKFEED n n的单位 dot

#### Declared In

`TscCommand.h`

### `+ formFeed`

this command feeds label to the beginning of next label. FORMFEED

`+ (NSData *)formFeed`

#### Discussion

this command feeds label to the beginning of next label. FORMFEED

#### Declared In

`TscCommand.h`

### `+ home`

this command will feed label until the sensor has determined origin. HOME

`+ (NSData *)home`

#### Discussion

this command will feed label until the sensor has determined origin. HOME

#### Declared In

`TscCommand.h`

### `+ print:`

this command prints the label format currently stored in the image buffer. PRINT m

`+ (NSData *)print:(int)m`

#### Parameters

`m` | specifies how many sets of labels will be printed

#### Discussion

this command prints the label format currently stored in the image buffer. PRINT m

#### Declared In

`TscCommand.h`

### `+ printWithM:andN:`

this command prints the label format currently stored in the image buffer. PRINT M,N

`+ (NSData *)printWithM:(int)m andN:(int)n`

#### Parameters

`m` | specifies how many sets of labels will be printed
`n` | specifies how many copies should be printed for each particular label set.

#### Discussion

this command prints the label format currently stored in the image buffer. PRINT M,N

#### Declared In

`TscCommand.h`

### `+ soundWithLevel:andInterval:`

this command controls the sound frequency of the beeper .there are 10 levels of sounds SOUND level,interval

`+ (NSData *)soundWithLevel:(int)level andInterval:(int)interval`

#### Parameters

`level` | sound level:0-9.
`interval` | sound interval:1-4095.

#### Discussion

this command controls the sound frequency of the beeper .there are 10 levels of sounds SOUND level,interval

#### Declared In

`TscCommand.h`

### `+ cut`

this command activates the cutter to immediately cut the labels without back feeding the label. 切纸 CUT

`+ (NSData *)cut`

#### Discussion

this command activates the cutter to immediately cut the labels without back feeding the label. 切纸 CUT

#### Declared In

`TscCommand.h`

### `+ limitFeedBymm:`

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 mm

`+ (NSData *)limitFeedBymm:(double)n`

#### Parameters

`n` | the limit length of wrong(in mm).

#### Discussion

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 mm

#### Declared In

`TscCommand.h`

### `+ limitFeedBydot:`

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 dot

`+ (NSData *)limitFeedBydot:(int)n`

#### Parameters

`n` | the limit length of wrong(in dots).

#### Discussion

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 dot

#### Declared In

`TscCommand.h`

### `+ limitFeedByinch:`

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 inch

`+ (NSData *)limitFeedByinch:(double)n`

#### Parameters

`n` | the limit length of wrong(in inch).

#### Discussion

this command use to stop feeding paper while feed paper wrong. 用于设定打印机进纸时，无法检测到垂直间距，发送错误，停止进纸 LIMITFEED n 单位 inch

#### Declared In

`TscCommand.h`

### `+ selfTest`

At this command ,the printer will print out the printer information SELFTEST

`+ (NSData *)selfTest`

#### Discussion

At this command ,the printer will print out the printer information SELFTEST

#### Declared In

`TscCommand.h`

### `+ selfTest:`

At this command,the printer will print out the printer information SELFTEST page

`+ (NSData *)selfTest:(NSString *)page`

#### Parameters

`page` | the one kind of the printer informations.

#### Discussion

At this command,the printer will print out the printer information SELFTEST page

#### Declared In

`TscCommand.h`

### `+ eoj`

let the printer wait until process of commands (before EOJ) be then go on the next command EOJ

`+ (NSData *)eoj`

#### Discussion

let the printer wait until process of commands (before EOJ) be then go on the next command EOJ

#### Declared In

`TscCommand.h`

### `+ delay:`

let the printer wait specific period of time then go on next command DELAY ms

`+ (NSData *)delay:(int)ms`

#### Parameters

`ms` | print delay how many seconds.

#### Discussion

let the printer wait specific period of time then go on next command DELAY ms

#### Declared In

`TscCommand.h`

### `+ display:`

this command can show the image ,which is in printer’s image buffer,on LCD panel DISPLAY IMAGE/OFF

`+ (NSData *)display:(NSString *)str`

#### Parameters

`str` | IMAGE showthe image in printer’s image buffer,on LCD panel OFF disable this finction.

#### Discussion

this command can show the image ,which is in printer’s image buffer,on LCD panel DISPLAY IMAGE/OFF

#### Declared In

`TscCommand.h`

### `+ initialPrinter`

this command can restore printer settings to defaults INITIALPRINTER

`+ (NSData *)initialPrinter`

#### Discussion

this command can restore printer settings to defaults INITIALPRINTER

#### Declared In

`TscCommand.h`

### `+ barWithX:andY:andWidth:andHeigt:`

this command draws a bar on the label format. BAR x,y,width,heigt

`+ (NSData *)barWithX:(int)x andY:(int)y andWidth:(int)w andHeigt:(int)h`

#### Parameters

`x` | the upper left corner x-coordinate (in dots).
`y` | the upper left corner y-coordinate (in dots).
`w` | bar width(in dots).
`h` | bar height(in dots).

#### Discussion

this command draws a bar on the label format. BAR x,y,width,heigt

#### Declared In

`TscCommand.h`

### `+ barcodeWithX:andY:andCodeType:andHeight:andHunabReadable:andRotation:andNarrow:andWide:andContent:usStrEnCoding:`

this command prints 1D barcodes BARCODE X,Y,“codetype”,height,humanreadable,rotation,narrow,wide,“content”

`+ (NSData *)barcodeWithX:(int)x andY:(int)y andCodeType:(NSString *)codetype andHeight:(int)height andHunabReadable:(int)readable andRotation:(int)rotation andNarrow:(int)narrow andWide:(int)wide andContent:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Parameters

`x` | specify the x-coordinate.
`y` | specify the y-coordinate.
`readable` | HRI readable,0-3;
`rotation` | graphic rotation,0-90-180-270;
`narrow` | space in uint.
`wide` | width of uint.
`content` | barcode’s content.
`strEnCoding` | barcode’s content’s encoding.

#### Discussion

this command prints 1D barcodes BARCODE X,Y,“codetype”,height,humanreadable,rotation,narrow,wide,“content”

#### Declared In

`TscCommand.h`

### `+ bitmapWithX:andY:andMode:andImage:andBmpType:`

this command draws bitmap images. BITMAP X,Y,width,height,mode,bitmap data

`+ (NSData *)bitmapWithX:(int)x andY:(int)y andMode:(int)mode andImage:(UIImage *)image andBmpType:(BmpType)bmptype`

#### Parameters

`x` | specify the x-coordinate
`y` | specify the y-coordinate
`mode` | graphic modes listed below: 0:OVERWRINTE 1:OR 2:XOR
`image` | the graphic you want to print.
`bmptype` | the type you want to print the image.

#### Discussion

this command draws bitmap images. BITMAP X,Y,width,height,mode,bitmap data

#### Declared In

`TscCommand.h`

### `+ boxWithX:andY:andEndX:andEndY:andThickness:`

this command draws rectangles on the label BOX X,Y,X_END,Y_END,LINE_THICNESS

`+ (NSData *)boxWithX:(int)x andY:(int)y andEndX:(int)x_end andEndY:(int)y_end andThickness:(int)thickness`

#### Parameters

`x` | specify x-coordinate of upper left corner(in dots).
`y` | specify y-coordinate of upper left corner(in dots).
`x_end` | specify x-coordinate of lower right corner(in dots).
`y_end` | specify y-coordinate of lower right corner(in dots).
`thickness` | sepcify the round corner.default is 0.

#### Discussion

this command draws rectangles on the label BOX X,Y,X_END,Y_END,LINE_THICNESS

#### Declared In

`TscCommand.h`

### `+ ellipseWithX:andY:andWidth:andHeight:andThickness:`

this command draws an ellipse on the label. ELLIPSE X,Y,width,height,thickness.

`+ (NSData *)ellipseWithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height andThickness:(int)thickness`

#### Parameters

`x` | specify x-coordinate of upper left corner(in dots).
`y` | specify y-coordinate of upper left corner(in dots).
`width` | specify the width of the ellipse(in dots).
`height` | specify the height of the ellipse(in dots).

#### Discussion

this command draws an ellipse on the label. ELLIPSE X,Y,width,height,thickness.

#### Declared In

`TscCommand.h`

### `+ codaBlockFModeWithX:andY:andRotation:andContent:`

this command draws CODEBLOCK F mode barcode. CODABLOCK x,y,rotation,x,“content”

`+ (NSData *)codaBlockFModeWithX:(int)x andY:(int)y andRotation:(int)rotation andContent:(NSString *)content`

#### Parameters

`x` | specify the x-coordinate
`y` | specify the y-coordinate
`rotation` | Rotate rotation degrees clockwise
`content` | content of codablock bar code.

#### Discussion

this command draws CODEBLOCK F mode barcode. CODABLOCK x,y,rotation,x,“content”

#### Declared In

`TscCommand.h`

### `+ dmateixWithX:andY:andWidth:andHeight:andContent:usStrEnCoding:`

this command draws an DataMatrix 2d barcode . 绘制二维条码DataMatrix DMATRIX x,y,width,height,content

`+ (NSData *)dmateixWithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height andContent:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Parameters

`x` | specify x-coordinate of upper left corner(in dots).
`y` | specify y-coordinate of upper left corner(in dots).
`width` | specify the width of DataMatrix.
`height` | specify the height of DataMatrix.
`content` | the content of DataMatrix.

#### Discussion

this command draws an DataMatrix 2d barcode . 绘制二维条码DataMatrix DMATRIX x,y,width,height,content

#### Declared In

`TscCommand.h`

### `+ eraseWithX:andY:andWidth:andHeight:`

this command clears a specified region in the image buffer ERASE x,y,width,height

`+ (NSData *)eraseWithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height`

#### Parameters

`x` | the x-coordinate of d=the starting point(in dots).
`y` | the y-coordinate of d=the starting point(in dots).
`width` | the region width in x-axis direction(in dots).
`height` | the region height in y-axis direction(in dots).

#### Discussion

this command clears a specified region in the image buffer ERASE x,y,width,height

#### Declared In

`TscCommand.h`

### `+ pdf417WithX:andY:andWidth:andHeight:andRotate:andContent:usStrEnCoding:`

this command defines a PDF417 2d bar code PDF417 x,y,width,height,rotatte,“content”

`+ (NSData *)pdf417WithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height andRotate:(int)rotate andContent:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Discussion

this command defines a PDF417 2d bar code PDF417 x,y,width,height,rotatte,“content”

#### Declared In

`TscCommand.h`

### `+ putBmpWithX:andY:andFileName:`

this comand prints BMP format images PUTBMP x,y,“filename”

`+ (NSData *)putBmpWithX:(int)x andY:(int)y andFileName:(NSString *)filename`

#### Parameters

`x` | the x-coordinate of the BMP format image
`y` | the y-coordinate of the BMP format image
`filename` | the download BMP filename.

#### Discussion

this comand prints BMP format images PUTBMP x,y,“filename”

#### Declared In

`TscCommand.h`

### `+ pubBmpWithX:andY:andFileName:andContrast:`

this command prints BMP format images PUTBMP x,y,“filename”,bpp,contrast

`+ (NSData *)pubBmpWithX:(int)x andY:(int)y andFileName:(NSString *)filename andContrast:(int)contrast`

#### Discussion

this command prints BMP format images PUTBMP x,y,“filename”,bpp,contrast

#### Declared In

`TscCommand.h`

### `+ putPcxWithX:andY:andFileName:`

this command prints PCX format images. PUTPCX x,y,“filename”

`+ (NSData *)putPcxWithX:(int)x andY:(int)y andFileName:(NSString *)filename`

#### Parameters

`x` | the x-coordinate of the BMP format image
`y` | the y-coordinate of the BMP format image
`filename` | the download pcx filename.

#### Discussion

this command prints PCX format images. PUTPCX x,y,“filename”

#### Declared In

`TscCommand.h`

### `+ qrCodeWithX:andY:andEccLevel:andCellWidth:andMode:andRotation:andContent:usStrEnCoding:`

this command prints qr code QRCODE x,y,ecclevel,cell_width,mode,rotation,“content”

`+ (NSData *)qrCodeWithX:(int)x andY:(int)y andEccLevel:(NSString *)ecclevel andCellWidth:(int)cellwidth andMode:(NSString *)mode andRotation:(int)rotation andContent:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Parameters

`x` | the upper left corner x-coordinate of the QRcode.
`y` | the upper left corner y-coordinate of the QRcode.
`ecclevel` | error correction revovery level.
`cellwidth` | 1~10.
`mode` | A or M.
`rotation` | 0 or 90 or 180 or 270.
`content` | the content of QRcode.
`strEnCoding` | the encoding of content.

#### Discussion

this command prints qr code QRCODE x,y,ecclevel,cell_width,mode,rotation,“content”

#### Declared In

`TscCommand.h`

### `+ reverseWithX:andY:andWidth:andHeight:`

this command reverses a region in image buffer. REVERSE x_start,y_start,x_width,y_height

`+ (NSData *)reverseWithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height`

#### Parameters

`x` | the x-coordinate of the starting point(in dots).
`y` | the y-coordinate of the starting point(in dots).
`width` | x-axis region width(in dots).
`height` | y-axis region height(in dots).

#### Discussion

this command reverses a region in image buffer. REVERSE x_start,y_start,x_width,y_height

#### Declared In

`TscCommand.h`

### `+ textWithX:andY:andFont:andRotation:andX_mul:andY_mul:andContent:usStrEnCoding:`

this command prints text on label TEXT x,y,“font”,rotation,x_multiplication,y_multiplication,“content”

`+ (NSData *)textWithX:(int)x andY:(int)y andFont:(NSString *)font andRotation:(int)rotation andX_mul:(int)x_mul andY_mul:(int)y_mul andContent:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Parameters

`x` | the x-coordinate of text.
`y` | the y-coordinate of text.
`font` | font name.
`rotation` | the rotation angle of text.
`x_mul` | horizontal multiplication,up to 10x.
`y_mul` | vertical multiplication,up to 10x.
`content` | the content of text string.
`strEnCoding` | the encoding of the content string.

#### Discussion

this command prints text on label TEXT x,y,“font”,rotation,x_multiplication,y_multiplication,“content”

#### Declared In

`TscCommand.h`

### `+ blockWithX:andY:andWidth:andHeight:andFont:andRotation:andX_mul:andY_mul:andConten:usStrEnCoding:`

this command prints paragraph on label BLOCK x,y,width,“font”,rotation,x_mul,y_mul,“content”

`+ (NSData *)blockWithX:(int)x andY:(int)y andWidth:(int)width andHeight:(int)height andFont:(NSString *)font andRotation:(int)rotaion andX_mul:(int)x_mul andY_mul:(int)y_mul andConten:(NSString *)content usStrEnCoding:(NSStringEncoding)strEnCoding`

#### Discussion

this command prints paragraph on label BLOCK x,y,width,“font”,rotation,x_mul,y_mul,“content”

#### Declared In

`TscCommand.h`

### `+ checkPrinterStatusByPort9100`

this command obiains the printer status at any time. !? 1D 61 1F

`+ (NSData *)checkPrinterStatusByPort9100`

#### Discussion

this command obiains the printer status at any time. !? 1D 61 1F

#### Declared In

`TscCommand.h`

### `+ checkPrinterStatusByPort4000`

this command obiains the printer status at any time.

`+ (NSData *)checkPrinterStatusByPort4000`

#### Discussion

this command obiains the printer status at any time.

1B 76 00

#### Declared In

`TscCommand.h`

### `+ download:`

Download 程序档 DOWNLOAD “EXAMPLE.BAS”

`+ (NSData *)download:(NSString *)filename`

#### Discussion

Download 程序档 DOWNLOAD “EXAMPLE.BAS”

#### Declared In

`TscCommand.h`

### `+ download:andSize:andConten:`

Download 文本档 DOWNLOAD “FILENAME”,DATASIZE,CONTENT

`+ (NSData *)download:(NSString *)filename andSize:(int)size andConten:(NSString *)content`

#### Discussion

Download 文本档 DOWNLOAD “FILENAME”,DATASIZE,CONTENT

#### Declared In

`TscCommand.h`

### `+ download:andPath:`

Download 文本文件档 DOWNLOAD “FILENAME”,FILE SIZE,DATA CONTENT

`+ (NSData *)download:(NSString *)filename andPath:(NSURL *)url`

#### Discussion

Download 文本文件档 DOWNLOAD “FILENAME”,FILE SIZE,DATA CONTENT

#### Declared In

`TscCommand.h`

### `+ eop`

End of program,to declare the start and the end of BASIC language used in progra. EOP

`+ (NSData *)eop`

#### Discussion

End of program,to declare the start and the end of BASIC language used in progra. EOP

#### Declared In

`TscCommand.h`

### `+ files`

this command prints out the total memory size,available memory size and files lists in the printer memory. FILES

`+ (NSData *)files`

#### Discussion

this command prints out the total memory size,available memory size and files lists in the printer memory. FILES

#### Declared In

`TscCommand.h`

### `+ kill:`

this command delects a file in the printer memory KILL “FILENAME”

`+ (NSData *)kill:(NSString *)filename`

#### Discussion

this command delects a file in the printer memory KILL “FILENAME”

#### Declared In

`TscCommand.h`

### `+ move`

this command moves download files from DRAM to FLASH memory. MOVE

`+ (NSData *)move`

#### Discussion

this command moves download files from DRAM to FLASH memory. MOVE

#### Declared In

`TscCommand.h`

### `+ run:`

this command executes a program resdent in the printer memory.it is available for TSPL2 printers only. RUN “FILENAME.BAS”

`+ (NSData *)run:(NSString *)filename`

#### Discussion

this command executes a program resdent in the printer memory.it is available for TSPL2 printers only. RUN “FILENAME.BAS”

#### Declared In

`TscCommand.h`