PosCommand Class Reference

Inherits from NSObject
Declared in PosCommand.h
PosCommand.m

Overview

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

+ horizontalPosition

水平定位 HT 09

+ (NSData *)horizontalPosition

Discussion

水平定位 HT 09

Declared In

PosCommand.h

+ printAndFeedLine

打印并换行 LF 0A

+ (NSData *)printAndFeedLine

Discussion

打印并换行 LF 0A

Declared In

PosCommand.h

+ printAndBackStandardModel

打印并回到标准模式 FF OC

+ (NSData *)printAndBackStandardModel

Discussion

打印并回到标准模式 FF OC

Declared In

PosCommand.h

+ printAndTabs

打印并跳格 CR 0D

+ (NSData *)printAndTabs

Discussion

打印并跳格 CR 0D

Declared In

PosCommand.h

+ canclePrintDataByPageModel

页模式下取消打印数据 CAN 18

+ (NSData *)canclePrintDataByPageModel

Discussion

页模式下取消打印数据 CAN 18

Declared In

PosCommand.h

+ sendRealTimeStatus:

实时状态传送 DLE EOT n 10 04 n

+ (NSData *)sendRealTimeStatus:(int)n

Parameters

n

1<=n<=4.

Discussion

实时状态传送 DLE EOT n 10 04 n

Declared In

PosCommand.h

+ requestRealTimeForPrint:

实时对打印机请求 DLE ENQ n 10 05 n

+ (NSData *)requestRealTimeForPrint:(int)n

Parameters

n

1<=n<=2.

Discussion

实时对打印机请求 DLE ENQ n 10 05 n

Declared In

PosCommand.h

+ openCashBoxRealTimeWithM:andT:

实时产生开钱箱脉冲 DLE DC4 n m t 10 14 01 m t

+ (NSData *)openCashBoxRealTimeWithM:(int)m andT:(int)t

Parameters

m

m=0,或1;

t

1<=t<=8.

Discussion

实时产生开钱箱脉冲 DLE DC4 n m t 10 14 01 m t

Declared In

PosCommand.h

+ printUnderPageModel

页模式下打印 ESC FF 1B 0C 该命令只在页模式下有效

+ (NSData *)printUnderPageModel

Discussion

页模式下打印 ESC FF 1B 0C 该命令只在页模式下有效

Declared In

PosCommand.h

+ setCharRightSpace:

设置字符右间距 1B 20 n

+ (NSData *)setCharRightSpace:(int)n

Parameters

n

0~255,in dots.

Discussion

设置字符右间距 1B 20 n

Declared In

PosCommand.h

+ selectPrintModel:

选择打印模式 ESC !n 1B 21 n

+ (NSData *)selectPrintModel:(int)n

Parameters

n

0~255,只有n的最后一位有效,0代表取消,1代表选择.

Discussion

选择打印模式 ESC !n 1B 21 n

Declared In

PosCommand.h

+ setAbsolutePrintPositionWithNL:andNH:

设置绝对打印位置 ESC $ nL nH 1B 24 nL nH nL+nH*256 代表距离行首位置

+ (NSData *)setAbsolutePrintPositionWithNL:(int)nL andNH:(int)nH

Discussion

设置绝对打印位置 ESC $ nL nH 1B 24 nL nH nL+nH*256 代表距离行首位置

Declared In

PosCommand.h

+ selectOrCancleCustomChar:

选择或取消用户自定义字符 ESC % n 1B 25 n

+ (NSData *)selectOrCancleCustomChar:(int)n

Parameters

n

0~255,只有n的最后一位有效,0代表取消,1代表选择.

Discussion

选择或取消用户自定义字符 ESC % n 1B 25 n

Declared In

PosCommand.h

+ defineUserDefinedCharactersWithM:andNL:andNH:andBytes:

定义用户自定义字符 ESC * m nL nH d1 d2 …dk

+ (NSData *)defineUserDefinedCharactersWithM:(int)m andNL:(int)nL andNH:(int)nH andBytes:(Byte *)bytes

Parameters

bytes

字符下载的字符的二进制数据。

c1

起始字符代码

c2

终止字符代码,32<=c1<=c2<=127

Discussion

定义用户自定义字符 ESC * m nL nH d1 d2 …dk

Declared In

PosCommand.h

+ selectBmpModelWithM:andnL:andnH:andNSData:

选择位图模式 ESC * m nL nH d1 d2 …dk b={d1,d2…dk},m=0,1时,k=nL+256nH;m=32,33时,k=(nL+256nH)*3;d:0-255;

+ (NSData *)selectBmpModelWithM:(int)m andnL:(int)nL andnH:(int)nH andNSData:(NSData *)data

Parameters

m

m 范围:0,1,32,33,代表不同点的密度

nL

nL范围:0-255

nH

nH范围:0-3

data

b={d1,d2…dk},m=0,1时,k=nL+256nH;m=32,33时,k=(nL+256nH)*3;d:0-255;

Discussion

选择位图模式 ESC * m nL nH d1 d2 …dk b={d1,d2…dk},m=0,1时,k=nL+256nH;m=32,33时,k=(nL+256nH)*3;d:0-255;

Declared In

PosCommand.h

+ selectOrCancleUnderLineModel:

选择或取消下划线模式 ESC-n 1B 2D n

+ (NSData *)selectOrCancleUnderLineModel:(int)n

Parameters

n

0 or 48 cancel;1 or 49 select(by 1 dot);2 or 50 select (by 2 dots).

Discussion

选择或取消下划线模式 ESC-n 1B 2D n

Declared In

PosCommand.h

+ setDefultLineSpace

设置默认行间距 ESC 2

+ (NSData *)setDefultLineSpace

Discussion

设置默认行间距 ESC 2

Declared In

PosCommand.h

+ setDefultLineSpace:

设置行间距 ESC 3 n 1B 33 n

+ (NSData *)setDefultLineSpace:(int)n

Discussion

设置行间距 ESC 3 n 1B 33 n

Declared In

PosCommand.h

+ selectPrinter:

选择打印机 ESC = n 1B 3D n n 0或1

+ (NSData *)selectPrinter:(int)n

Discussion

选择打印机 ESC = n 1B 3D n n 0或1

Declared In

PosCommand.h

+ cancleUserDefinedCharacters:

取消用户自定义字符 ESC ? n 取消用户自定义字符中代码为n的字符 n 范围:32-127

+ (NSData *)cancleUserDefinedCharacters:(int)n

Discussion

取消用户自定义字符 ESC ? n 取消用户自定义字符中代码为n的字符 n 范围:32-127

Declared In

PosCommand.h

+ initializePrinter

初始化打印机 ESC @ 1B 40

+ (NSData *)initializePrinter

Discussion

初始化打印机 ESC @ 1B 40

Declared In

PosCommand.h

+ setHorizontalTabsPosition:

设置横向跳格位置 ESC D n1 …nk NUL

+ (NSData *)setHorizontalTabsPosition:(NSData *)data

Parameters

data

data={n1…nk};k<=32;跳格距离=字符宽度*k,参数data内的n值和k值请参考编程手册

Discussion

设置横向跳格位置 ESC D n1 …nk NUL

Declared In

PosCommand.h

+ selectOrCancleBoldModel:

选择或取消加粗模式 ESC E n 1B 45 n

+ (NSData *)selectOrCancleBoldModel:(int)n

Parameters

n

0~255,只有n的最后一位有效,0代表取消,1代表选择.

Discussion

选择或取消加粗模式 ESC E n 1B 45 n

Declared In

PosCommand.h

+ selectOrCancleDoublePrintModel:

选择或取消双重打印模式 ESC G n 1B 47 n

+ (NSData *)selectOrCancleDoublePrintModel:(int)n

Parameters

n

0~255,只有n的最后一位有效,0代表取消,1代表选择.

Discussion

选择或取消双重打印模式 ESC G n 1B 47 n

Declared In

PosCommand.h

+ printAdnFeed:

打印并走纸 ESC J n 1B 4A n

+ (NSData *)printAdnFeed:(int)n

Parameters

n

specify the length(in inch) feeds.

Discussion

打印并走纸 ESC J n 1B 4A n

Declared In

PosCommand.h

+ selectPagemodel

选择页模式 ESC L 1B 4C

+ (NSData *)selectPagemodel

Discussion

选择页模式 ESC L 1B 4C

Declared In

PosCommand.h

+ selectFont:

选择字体 ESC M n 1B 4D n n 范围: 0,1,48,49;

+ (NSData *)selectFont:(int)n

Discussion

选择字体 ESC M n 1B 4D n n 范围: 0,1,48,49;

Declared In

PosCommand.h

+ selectInternationCharacterSets:

选择国际字符集 ESC R n n 0-15,代表一种国际字符集 1B 52 n

+ (NSData *)selectInternationCharacterSets:(int)n

Discussion

选择国际字符集 ESC R n n 0-15,代表一种国际字符集 1B 52 n

Declared In

PosCommand.h

+ selectStabdardModel

选择标准模式 ESC S 1B 53

+ (NSData *)selectStabdardModel

Discussion

选择标准模式 ESC S 1B 53

Declared In

PosCommand.h

+ selectPrintDirectionUnderPageModel:

在页模式下选择打印区域方向 ESC T n 1B 54 n

+ (NSData *)selectPrintDirectionUnderPageModel:(int)n

Parameters

n

0<=n<=3 or 48<=n<=51;n指定打印区域的方向和起始位置。

Discussion

在页模式下选择打印区域方向 ESC T n 1B 54 n

Declared In

PosCommand.h

+ selectOrCancleCW90:

选择或取消顺时针旋转90度 此命令只在页模式下有效 ESC V n 1B 56 n

+ (NSData *)selectOrCancleCW90:(int)n

Parameters

n

n=0 or 48代表取消;n=1 or 49代表选择.

Discussion

选择或取消顺时针旋转90度 此命令只在页模式下有效 ESC V n 1B 56 n

Declared In

PosCommand.h

+ setPrintAreaUnderPageModelWithxL:andxH:andyL:andyH:anddxL:anddxH:anddyL:anddyK:

页模式下设置打印区域 ESC W xL xH yL yH dxL dxH dyL dyH 1B 57 xL xH yL yH dxL dxH dyL dyH xL+xH256 代表x方向起始位置 yL+yH256 代表y方向起始位置 dxL+dxH256 代表x方向的宽度 dyL+dyH256 代表y方向的高度

+ (NSData *)setPrintAreaUnderPageModelWithxL:(int)xL andxH:(int)xH andyL:(int)yL andyH:(int)yH anddxL:(int)dxL anddxH:(int)dxH anddyL:(int)dyL anddyK:(int)dyH

Discussion

页模式下设置打印区域 ESC W xL xH yL yH dxL dxH dyL dyH 1B 57 xL xH yL yH dxL dxH dyL dyH xL+xH256 代表x方向起始位置 yL+yH256 代表y方向起始位置 dxL+dxH256 代表x方向的宽度 dyL+dyH256 代表y方向的高度

Declared In

PosCommand.h

+ setRelativeHorizontalPrintPositionWithnL:andnH:

设置相对横向打印位置 ESC \ nL nH 1B 5C nL nH nL+nH*256 代表设置的大小

+ (NSData *)setRelativeHorizontalPrintPositionWithnL:(int)nL andnH:(int)nH

Discussion

设置相对横向打印位置 ESC \ nL nH 1B 5C nL nH nL+nH*256 代表设置的大小

Declared In

PosCommand.h

+ selectAlignment:

选择对齐方式 ESC a n 1B 61 n

+ (NSData *)selectAlignment:(int)n

Discussion

选择对齐方式 ESC a n 1B 61 n

Declared In

PosCommand.h

+ selectPrintTransducerOutPutPageOutSignal:

选择打印机传感器以输出却纸信号 ESC c 3 n 1B 63 33 n

+ (NSData *)selectPrintTransducerOutPutPageOutSignal:(int)n

Parameters

n

0~255.

Discussion

选择打印机传感器以输出却纸信号 ESC c 3 n 1B 63 33 n

Declared In

PosCommand.h

+ selectPrintTransducerStopPrint:

选择打印机传感器-停止打印 ESC c 4 n 1B 63 34 n

+ (NSData *)selectPrintTransducerStopPrint:(int)n

Parameters

n

0~255.

Discussion

选择打印机传感器-停止打印 ESC c 4 n 1B 63 34 n

Declared In

PosCommand.h

+ allowOrForbidPressButton:

允许或禁止按键 ESC c 5 n 1B 63 35 n

+ (NSData *)allowOrForbidPressButton:(int)n

Parameters

n

n的最后一位决定,1则允许,0则禁止。

Discussion

允许或禁止按键 ESC c 5 n 1B 63 35 n

Declared In

PosCommand.h

+ printAndFeedForwardWhitN:

打印并向前走纸n行 ESC d n 1B 64 n

+ (NSData *)printAndFeedForwardWhitN:(int)n

Parameters

n

0~255.

Discussion

打印并向前走纸n行 ESC d n 1B 64 n

Declared In

PosCommand.h

+ creatCashBoxContorPulseWithM:andT1:andT2:

产生钱箱控制脉冲 ESC p m t1 t2 1B 70 m t1 t2

+ (NSData *)creatCashBoxContorPulseWithM:(int)m andT1:(int)t1 andT2:(int)t2

Parameters

m:连接引脚,0

or 1 or 48 or 49. t1 ,t2 :0~255.

Discussion

产生钱箱控制脉冲 ESC p m t1 t2 1B 70 m t1 t2

Declared In

PosCommand.h

+ selectCharacterCodePage:

选择字符代码表 ESC t n 1B 74 n

+ (NSData *)selectCharacterCodePage:(int)n

Parameters

n

0~10 or 16~19

Discussion

选择字符代码表 ESC t n 1B 74 n

Declared In

PosCommand.h

+ selectOrCancleConvertPrintModel:

选择或取消倒置打印 ESC { n 1B 7B n

+ (NSData *)selectOrCancleConvertPrintModel:(int)n

Parameters

n

n的最后一位决定,1则选择,0则取消。

Discussion

选择或取消倒置打印 ESC { n 1B 7B n

Declared In

PosCommand.h

+ printBmpInFLASHWithN:andM:

打印下载到FLASH中的位图 FS p n m

+ (NSData *)printBmpInFLASHWithN:(int)n andM:(int)m

Parameters

n

代表FLASH缓存中的第n个位置的图像

m

打印FLASH位图的方式,0~3 or 48~51,分别代表正常,倍宽,倍高,倍宽高。

Discussion

打印下载到FLASH中的位图 FS p n m

Declared In

PosCommand.h

+ definedFlashBmpWithN:andBmp:andBmpType:andPrintType:

定义FLASH位图 FS q n [xL xH yL yH d1…dk]…[xL xH yL yH d1…dk] 1C 71 n data n:定义的位图数量 data=[xL xH yL yH d1…dk]…[xL xH yL yH d1…dk],代表多个位图的数据,每个位图前都包含了xL xH yL yH代表图像数据宽和高

+ (NSData *)definedFlashBmpWithN:(int)n andBmp:(UIImage *)image andBmpType:(BmpType)bmptype andPrintType:(PrintRasterType)type

Discussion

定义FLASH位图 FS q n [xL xH yL yH d1…dk]…[xL xH yL yH d1…dk] 1C 71 n data n:定义的位图数量 data=[xL xH yL yH d1…dk]…[xL xH yL yH d1…dk],代表多个位图的数据,每个位图前都包含了xL xH yL yH代表图像数据宽和高

Declared In

PosCommand.h

+ selectCharacterSize:

选择字符大小 GS ! n

+ (NSData *)selectCharacterSize:(int)n

Parameters

n

0~255,n的0-3位设定字符高度,4-7为来设定字符宽度。

Discussion

选择字符大小 GS ! n

Declared In

PosCommand.h

+ setAbsolutePositionUnderPageModelWithnL:andnH:

页模式下设置绝对位置 GS $ nL nH 1D 24 nL nH nL ,nH 范围:0~255,nL+nH*256代表位置,单位inch

+ (NSData *)setAbsolutePositionUnderPageModelWithnL:(int)nL andnH:(int)nH

Discussion

页模式下设置绝对位置 GS $ nL nH 1D 24 nL nH nL ,nH 范围:0~255,nL+nH*256代表位置,单位inch

Declared In

PosCommand.h

+ definedDownLoadBmp:byType:

定义下载位图 GS x y[d1…d(8*xy)] 1D 2A data

+ (NSData *)definedDownLoadBmp:(UIImage *)image byType:(BmpType)bmptype

Parameters

image

image对象

Discussion

定义下载位图 GS x y[d1…d(8*xy)] 1D 2A data

Declared In

PosCommand.h

+ executePrintDataSavaByTeansformToHex

执行打印机数据十六进制转储 GS ( A pL pH n m 1D 28 41 02 00 00 01

+ (NSData *)executePrintDataSavaByTeansformToHex

Discussion

执行打印机数据十六进制转储 GS ( A pL pH n m 1D 28 41 02 00 00 01

Declared In

PosCommand.h

+ printDownLoadBmp:

打印下载位图 GS / m 1D 2F m

+ (NSData *)printDownLoadBmp:(int)m

Parameters

m:打印模式,范围:0~3

or 48~51.

Discussion

打印下载位图 GS / m 1D 2F m

Declared In

PosCommand.h

+ startOrStopMacrodeFinition

开始或结束宏定义 GS : 1D 3A

+ (NSData *)startOrStopMacrodeFinition

Discussion

开始或结束宏定义 GS : 1D 3A

Declared In

PosCommand.h

+ selectOrCancleInvertPrintModel:

选择或取消黑白反显打印模式 GS B n 1D 42 n

+ (NSData *)selectOrCancleInvertPrintModel:(int)n

Parameters

n

n的最后一位为1,选择,为0,取消.

Discussion

选择或取消黑白反显打印模式 GS B n 1D 42 n

Declared In

PosCommand.h

+ selectHRICharactersPrintPosition:

选择HRI字符打印位置 GS H n 1D 48 n

+ (NSData *)selectHRICharactersPrintPosition:(int)n

Parameters

n

0~3 or 48~51,代表字符相对条码的打印位置。

Discussion

选择HRI字符打印位置 GS H n 1D 48 n

Declared In

PosCommand.h

+ setLeftSpaceWithnL:andnH:

设置左边距 GS L nL nH 1D 4C nL nH (nL+nH256)横向移动单位,代表设置的左边距,单位:inch.

+ (NSData *)setLeftSpaceWithnL:(int)nL andnH:(int)nH

Discussion

设置左边距 GS L nL nH 1D 4C nL nH (nL+nH256)横向移动单位,代表设置的左边距,单位:inch.

Declared In

PosCommand.h

+ setHorizontalAndVerticalMoveUnitWithX:andY:

设置横向和纵向移动单位 GS P x y 1D 50 x y

+ (NSData *)setHorizontalAndVerticalMoveUnitWithX:(int)x andY:(int)y

Parameters

x

横向移动单位,0~255.

y

纵向移动单位,0~255.

Discussion

设置横向和纵向移动单位 GS P x y 1D 50 x y

Declared In

PosCommand.h

+ selectCutPageModelAndCutpage:

选择切纸模式并切纸 GS V m 1D 56 m

+ (NSData *)selectCutPageModelAndCutpage:(int)m

Parameters

m

0 or 48,全切;1 or 49,半切.

Discussion

选择切纸模式并切纸 GS V m 1D 56 m

Declared In

PosCommand.h

+ selectCutPageModelAndCutpageWithM:andN:

选择切纸模式并切纸 GS V m n 1D 56 m n

+ (NSData *)selectCutPageModelAndCutpageWithM:(int)m andN:(int)n

Parameters

m

m=66.

n

进纸n,然后半切纸。

Discussion

选择切纸模式并切纸 GS V m n 1D 56 m n

Declared In

PosCommand.h

+ setPrintAreaWidthWithnL:andnH:

设置打印区域宽度 GS W nL nH 1D 57 nL nH (nL+nH256)横向移动单位,代表打印区域宽度.

+ (NSData *)setPrintAreaWidthWithnL:(int)nL andnH:(int)nH

Discussion

设置打印区域宽度 GS W nL nH 1D 57 nL nH (nL+nH256)横向移动单位,代表打印区域宽度.

Declared In

PosCommand.h

+ setVertivalRelativePositionUnderPageModelWithNL:andNH:

页模式下设置绝对打印位置 GS \ nL nH 1D 5C nL nH (nL+nH256)纵向移动单位,代表相对于当前打印位置纵向移动距离.

+ (NSData *)setVertivalRelativePositionUnderPageModelWithNL:(int)nL andNH:(int)nH

Discussion

页模式下设置绝对打印位置 GS \ nL nH 1D 5C nL nH (nL+nH256)纵向移动单位,代表相对于当前打印位置纵向移动距离.

Declared In

PosCommand.h

+ executeMacrodeCommandWithR:andT:andM:

执行宏命令 GS ^ r t m 1D 5E r t m

+ (NSData *)executeMacrodeCommandWithR:(int)r andT:(int)t andM:(int)m

Parameters

r

0~255,执行次数.

t

0~255,执行等待时间。

m

0 or 1,执行模式。

Discussion

执行宏命令 GS ^ r t m 1D 5E r t m

Declared In

PosCommand.h

+ openOrCloseAutoReturnPrintState:

打开或关闭自动状态返回功能 GS a n 1D 61 n

+ (NSData *)openOrCloseAutoReturnPrintState:(int)n

Parameters

n

0~255,n的每一位代表不同类型的状态返回.

Discussion

打开或关闭自动状态返回功能 GS a n 1D 61 n

Declared In

PosCommand.h

+ selectHRIFont:

选择HRI使用字体 GS f n 1D 66 n

+ (NSData *)selectHRIFont:(int)n

Parameters

n

0 or 48 代表标准;1 or 49 代表压缩字体。

Discussion

选择HRI使用字体 GS f n 1D 66 n

Declared In

PosCommand.h

+ setBarcodeHeight:

选择条码高度 GS h n 1D 68 n

+ (NSData *)setBarcodeHeight:(int)n

Parameters

n

1~255,defualt:162.

Discussion

选择条码高度 GS h n 1D 68 n

Declared In

PosCommand.h

+ printBarcodeWithM:andContent:useEnCodeing:

打印条码 GS k m d1…dk NUL 1D 6B m d1…dk 00

+ (NSData *)printBarcodeWithM:(int)m andContent:(NSString *)content useEnCodeing:(NSStringEncoding)strEncoding

Parameters

m

条码类型,0~6.

content

条码内容。

Discussion

打印条码 GS k m d1…dk NUL 1D 6B m d1…dk 00

Declared In

PosCommand.h

+ printBarcodeWithM:andN:andContent:useEnCodeing:

打印条码 GS k m n d1…dk 1D 6B m n d1…dk

+ (NSData *)printBarcodeWithM:(int)m andN:(int)n andContent:(NSString *)content useEnCodeing:(NSStringEncoding)strEncoding

Parameters

m

条码类型,66~73.

n

条码内容content的长度。

Discussion

打印条码 GS k m n d1…dk 1D 6B m n d1…dk

Declared In

PosCommand.h

+ returnState:

返回状态 GS r n 1D 72 n

+ (NSData *)returnState:(int)n

Parameters

n

1,2,49,50;1 or 49返回传感器状态,2 or 50返回钱箱状态。

Discussion

返回状态 GS r n 1D 72 n

Declared In

PosCommand.h

+ printRasteBmpWithM:andImage:andType:

打印光栅位图 GS V 0 m (PrintRasterType) m:打印模式。 (UIImage *) image:图片对象。 (BmpType) type:图片处理采用的方式,二值法或者抖动算法处理。

+ (NSData *)printRasteBmpWithM:(PrintRasterType)m andImage:(UIImage *)image andType:(BmpType)type

Discussion

打印光栅位图 GS V 0 m (PrintRasterType) m:打印模式。 (UIImage *) image:图片对象。 (BmpType) type:图片处理采用的方式,二值法或者抖动算法处理。

Declared In

PosCommand.h

+ setBarcoeWidth:

设置条码宽度 GS w n 1D 77 n

+ (NSData *)setBarcoeWidth:(int)n

Parameters

n:2~6,defualt

Discussion

设置条码宽度 GS w n 1D 77 n

Declared In

PosCommand.h

+ setChineseCharacterModel:

设置汉字字符模式 FA ! n 1C 21 n

+ (NSData *)setChineseCharacterModel:(int)n

Parameters

n

0~255,n的不同位定义字符模式。

Discussion

设置汉字字符模式 FA ! n 1C 21 n

Declared In

PosCommand.h

+ selectChineseCharacterModel

选择汉字模式 FS & 1C 26

+ (NSData *)selectChineseCharacterModel

Discussion

选择汉字模式 FS & 1C 26

Declared In

PosCommand.h

+ selectOrCancelChineseCharUnderLineModel:

选择或取消汉字下划线模式 FS - n 1C 2D n

+ (NSData *)selectOrCancelChineseCharUnderLineModel:(int)n

Parameters

n

0~2 or 48~50.

Discussion

选择或取消汉字下划线模式 FS - n 1C 2D n

Declared In

PosCommand.h

+ CancelChineseCharModel

取消汉字模式 FS . 1C 2E

+ (NSData *)CancelChineseCharModel

Discussion

取消汉字模式 FS . 1C 2E

Declared In

PosCommand.h

+ definedUserDefinedChineseCharWithCPosition:andNsdata:

定义用户自定义汉字 FS 2 c1 c2 d1…dk 1C 32 FE c2 d1…dk

+ (NSData *)definedUserDefinedChineseCharWithCPosition:(int)c2 andNsdata:(Byte *)bytes

Parameters

c2

A1H<=c2<=FEH.

bytes

代表汉字数据的字节数组。

Discussion

定义用户自定义汉字 FS 2 c1 c2 d1…dk 1C 32 FE c2 d1…dk

Declared In

PosCommand.h

+ setChineseCharLeftAndRightSpaceWithN1:andN2:

设置汉字字符左右间距 FS S n1 n2 1C 53 n1 n2 @param n1:左间距,0~255. @param n2:右间距,0~255.

+ (NSData *)setChineseCharLeftAndRightSpaceWithN1:(int)n1 andN2:(int)n2

Discussion

设置汉字字符左右间距 FS S n1 n2 1C 53 n1 n2 @param n1:左间距,0~255. @param n2:右间距,0~255.

Declared In

PosCommand.h

+ selectOrCancelChineseCharDoubleWH:

选择或取消汉字倍宽倍宽 FS W n 1C 57 n

+ (NSData *)selectOrCancelChineseCharDoubleWH:(int)n

Parameters

n

0~255,n的最低位为1,代表选择,为0,代表取消。

Discussion

选择或取消汉字倍宽倍宽 FS W n 1C 57 n

Declared In

PosCommand.h

+ printerOrderBuzzingHintWithRes:andTime:

打印机来单打印蜂鸣提示 ESC B n t 1B 42 n t

+ (NSData *)printerOrderBuzzingHintWithRes:(int)n andTime:(int)t

Parameters

n

蜂鸣次数,1~9.

t

t*50ms代表每次蜂鸣时间,1~9.

Discussion

打印机来单打印蜂鸣提示 ESC B n t 1B 42 n t

Declared In

PosCommand.h

+ printerOrderBuzzingAndWaringLightWithM:andT:andN:

打印机来单蜂鸣提示及报警灯闪烁 ESC C m t n 1B 43 m t n

+ (NSData *)printerOrderBuzzingAndWaringLightWithM:(int)m andT:(int)t andN:(int)n

Parameters

m

蜂鸣次数,报警灯闪烁次数,1~20.

t

(t*50ms)代表间隔时间,1~20.

n

0~3,分别代表是否鸣叫,闪烁.

Discussion

打印机来单蜂鸣提示及报警灯闪烁 ESC C m t n 1B 43 m t n

Declared In

PosCommand.h

+ setQRcodeUnitsize:

QRCODE:设置单元大小 GS ( 0 g n 1D 28 6B 30 67 n

+ (NSData *)setQRcodeUnitsize:(int)n

Parameters

n

0~255.

Discussion

QRCODE:设置单元大小 GS ( 0 g n 1D 28 6B 30 67 n

Declared In

PosCommand.h

+ setErrorCorrectionLevelForQrcode:

设置错误纠正等级 GS ( 0 i n 1D 28 6B 30 69 n

+ (NSData *)setErrorCorrectionLevelForQrcode:(int)n

Discussion

设置错误纠正等级 GS ( 0 i n 1D 28 6B 30 69 n

Declared In

PosCommand.h

+ sendDataToStoreAreaWitQrcodeConent:usEnCoding:

传输数据到编码缓存 GS ( 0 & nL nH d1…dk 1D 28 6B 30 80 nL nH d1…dk (NSString *) str 二维码的内容。

+ (NSData *)sendDataToStoreAreaWitQrcodeConent:(NSString *)str usEnCoding:(NSStringEncoding)strEnCoding

Discussion

传输数据到编码缓存 GS ( 0 & nL nH d1…dk 1D 28 6B 30 80 nL nH d1…dk (NSString *) str 二维码的内容。

Declared In

PosCommand.h

+ printTheQRcodeInStore

打印编码缓存的二维码 GS ( 0 ? 1D 28 6B 30 81

+ (NSData *)printTheQRcodeInStore

Discussion

打印编码缓存的二维码 GS ( 0 ? 1D 28 6B 30 81

Declared In

PosCommand.h

+ setPdf417Columns:

Set the number of columns in the data region 1D 28 6B 03 00 30 41 n

+ (NSData *)setPdf417Columns:(int)n

Discussion

Set the number of columns in the data region 1D 28 6B 03 00 30 41 n

Declared In

PosCommand.h

+ setpdf417WidthOfModule:

set the width of the moudule 1D 28 6B 03 00 30 43 n

+ (NSData *)setpdf417WidthOfModule:(int)n

Discussion

set the width of the moudule 1D 28 6B 03 00 30 43 n

Declared In

PosCommand.h

+ setpdf417RowHeight:

set the row height 1D 28 6B 03 00 30 44 n

+ (NSData *)setpdf417RowHeight:(int)n

Discussion

set the row height 1D 28 6B 03 00 30 44 n

Declared In

PosCommand.h

+ storethepdf417WithpL:andpH:andContent:usEnCoding:

store the data in the symbol storage area 1D 28 68 F9 00 30 50 30 d1…dk

+ (NSData *)storethepdf417WithpL:(int)pL andpH:(int)pH andContent:(NSString *)content usEnCoding:(NSStringEncoding)strEnCoding

Discussion

store the data in the symbol storage area 1D 28 68 F9 00 30 50 30 d1…dk

Declared In

PosCommand.h

+ printPdf417InStore

print the pdf417 symbol data in the symbol storage area 1D 28 6B 03 00 30 51 n

+ (NSData *)printPdf417InStore

Discussion

print the pdf417 symbol data in the symbol storage area 1D 28 6B 03 00 30 51 n

Declared In

PosCommand.h