public class DataForSendToPrinterPos76
extends java.lang.Object
构造器和说明 |
---|
DataForSendToPrinterPos76() |
限定符和类型 | 方法和说明 |
---|---|
static byte[] |
allowOrForbidPressButton(int n)
允许或禁止按键
ESC c 5 n |
static byte[] |
cancelChineseCharModel()
取消汉字模式
FS . |
static byte[] |
cancelUserDefinedCharacters(int n)
取消用户自定义字符
ESC ? |
static byte[] |
cancelUserDefinedChineseChar(int c2)
取消用户自定义中文字符
FS ? |
static byte[] |
creatCashboxContorlPulse(int m,
int t1,
int t2)
产生钱箱控制脉冲
ESC p m t1 t2 |
static byte[] |
definedUserDefinedChineseChar(int c2,
byte[] b)
定义用户自定义汉字
FS 2 c1 c2 d1...dk |
static byte[] |
defineuserDefinedCharacters(int c1,
int c2,
byte[] b)
定义用户自定义字符
ESC $ Y c1 c2 [x1 d1...d(x1*y)]... |
static byte[] |
executePrintDataSaveByTransformToHex()
执行打印机数据十六进制转储
GS ( A pL pH n m |
static byte[] |
feedBlackPaperToPrintPosition()
进黑标纸至打印起始位置
GS FF |
static byte[] |
feedpaperToOrderEnd()
进打印纸至单尾
ESC DEL 打印机接收到此命令后向前起纸,走纸长度为 (单长度 – 已打印长度) |
static byte[] |
horizontalPositioning()
水平定位指令;
HT |
static byte[] |
initializePrinter()
初始化打印机
ESC @ |
static byte[] |
openOrCloseAutoReturnPrintState(int n)
打开或关闭自动状态返回功能
GS a n |
static byte[] |
printAndBackFeed(int n)
打印并逆向进纸
ESC K n |
static byte[] |
PrintAndCarriageReturn()
打印并回车
CR |
static byte[] |
printAndFeed(int n)
打印并走纸
ESC J n |
static byte[] |
printAndFeedForward(int n)
打印并向前走纸n行
ESC d n |
static byte[] |
printAndFeedLine()
打印并换行
LF |
static byte[] |
printAndFeedUnidirection(int n)
打印并逆向走纸n行
ESC d n |
static byte[] |
printHeaderRecordAndFeedToPrintStartPosition()
打印机接收到此命令后向前起纸,走纸长度为 (单长度 – 已打印长度)
GS < 打印机接收到此命令后,首先打印头复位,然后走黑标纸至打印起始位置。 |
static byte[] |
printHeadReplaceEnter()
打印头归位回车
移动打印头至待用位置 ESC < |
static byte[] |
requestRealtimeForPrint(int n)
实时对打印机请求
DLE ENQ n |
static byte[] |
returnState(int n)
返回状态
GS r n |
static byte[] |
selectAlignment(int n)
选择对齐方式
ESC a n |
static byte[] |
selectBmpModel(int m,
Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
选择位图模式
ESC * m nL nH d1 d2...dk |
static byte[] |
selectCharacterCodePage(int n)
选择字符代码表
ESC t n |
static byte[] |
selectChineseCharModel()
选择汉字模式
FS & |
static byte[] |
selectCutPagerModerAndCutPager(int m)
选择切纸模式并切纸
GS V m |
static byte[] |
selectCutPagerModerAndCutPager(int m,
int n)
选择切纸模式并切纸
GS V m n |
static byte[] |
selectFont(int n)
选择字体
ESC M n |
static byte[] |
selectInternationalCharacterSets(int n)
选择国际字符集
ESC R n |
static byte[] |
selectOrCancelBoldModel(int n)
选择或取消加粗模式
ESC E n |
static byte[] |
selectOrCancelChineseCharDoubleWH(int n)
选择或取消汉字倍高倍宽
FS W n |
static byte[] |
selectOrCancelChineseCharUnderLineModel(int n)
选择或取消汉字下划线模式
FS - n |
static byte[] |
selectOrCancelConvertPrintModel(int n)
选择或取消倒置打印模式
ESC { n |
static byte[] |
selectOrCancelDoubelPrintModel(int n)
选择或取消双重打印模式
ESC G n |
static byte[] |
selectOrCancelUnderlineModel(int n)
选择或者取消下划线模式
ESC-n |
static byte[] |
selectOrCancelUnidirectionPrint(int n)
设定/解除单向打印
ESC U n |
static byte[] |
selectOrCancleCustomChar(int n)
选择或取消用户自定义字符
ESC % n |
static byte[] |
selectPrintColor(int n)
选择打印颜色
ESC t n |
static byte[] |
selectPrintModel(int n)
选择打印模式
ESC ! |
static byte[] |
selectPrintTransducerOutPutPageOutSignal(int n)
选择打印机纸传感器以输出缺纸信号
ESC c 3 n |
static byte[] |
selectPrintTransducerStopPrint(int n)
选择打印机传感器一停止打印
ESC c 4 n |
static byte[] |
sendRealtimestatus(int n)
实时状态传送
DLE EOT n |
static byte[] |
setBlackPositionRecord(int a,
int m,
int nL,
int nH)
设置黑标定位偏移量
GS ( F pL pH a m nL nH |
static byte[] |
setCharRightSpace(int n)
设置字符右间距
|
static byte[] |
setChineseCharacterModel(int n)
设置汉字字符模式
FS ! |
static byte[] |
setChineseCharLeftAndRightSpace(int n1,
int n2)
设置汉字字符左右间距
FS S n1 n2 |
static byte[] |
setConnectWaitTime(int t1,
int t2)
设置联机恢复等待时间
GS z 0 t1 t2 |
static byte[] |
setDefultLineSpacing()
设置默认行间距
ESC 2 大约3.75mm |
static byte[] |
setHorizontalmovementPosition(byte[] b)
设置横线跳格位置
ESC D n1...nk NUL; |
static byte[] |
setLineSpaceing(int n)
设置行间距
ESC 3 n |
static byte[] |
setOrderLength(int nL,
int nH)
设置单长度
ESC ~ nL nH |
static byte[] |
setRollBackLength(int n)
设置退纸长度
ESC ^ n |
public static byte[] horizontalPositioning()
public static byte[] printAndFeedLine()
public static byte[] PrintAndCarriageReturn()
public static byte[] sendRealtimestatus(int n)
n
- 1<=n<=4;public static byte[] requestRealtimeForPrint(int n)
n
- 1<=n<=2public static byte[] setCharRightSpace(int n)
n,代表间距大小的变量,范围0-255;
- public static byte[] selectPrintModel(int n)
n代表打印模式的变量,范围0-255
- public static byte[] selectOrCancleCustomChar(int n)
n
- 0-255,最低位为1,使用;最低位为0,不使用;public static byte[] defineuserDefinedCharacters(int c1, int c2, byte[] b)
c1
- c1是起始字符代码,c2是终止字符代码,范围32<=c1<=c2<=127;c2
- c2是终止字符代码,范围32<=c1<=c2<=127;b
- 字节数组b的格式为[x1 d1...d(x1*y)]...[xk d1...d(y*xk)],为字符下载的字符的数据的集合,自定义字符的规则详情,请参考编程手册;public static byte[] selectBmpModel(int m, Bitmap bitmap, BitmapToByteData.BmpType bmpType)
m
- 范围:0,1,32,33,代表不同点的密度nL
- 范围:0-255nH
- 范围:0-3b
- b={d1 d2...dk},m=0或1,k=nL+nH*256;m=32或33,k=(nL+nH*256)*3;0<=d<=255;
该指令详情请参考编程手册public static byte[] selectOrCancelUnderlineModel(int n)
n
- :0,48 取消下划线;1,49选择下划线(1点宽);2,50选择下划线(2点宽);public static byte[] setDefultLineSpacing()
public static byte[] setLineSpaceing(int n)
n范围:0-255
- public static byte[] printHeadReplaceEnter()
public static byte[] cancelUserDefinedCharacters(int n)
n
- 范围:32-127public static byte[] initializePrinter()
public static byte[] setHorizontalmovementPosition(byte[] b)
b={n1...nk};k<=32;跳格距离=字符宽度*n;
- 参数b内的n值大小和个数设置请参考编程手册public static byte[] selectOrCancelBoldModel(int n)
n
- 0-255,最低位为1,选择加粗;最低位为0,取消加粗;public static byte[] selectOrCancelDoubelPrintModel(int n)
n
- 0-255,最低位为1,选择双重打印;最低位为0,取消双重打印;public static byte[] printAndFeed(int n)
n
- 走纸距离,单位英寸,范围:0-255public static byte[] printAndBackFeed(int n)
public static byte[] selectFont(int n)
n
- 范围:0,1,48,49;0,48标准字体;1,49压缩字体public static byte[] selectInternationalCharacterSets(int n)
n
- :0-15;代表某一种国际字符集public static byte[] selectOrCancelUnidirectionPrint(int n)
n
- n的最低有效位,0,取消;1,设定;public static byte[] selectAlignment(int n)
n
- :0-2或48-50;分别表示:左对齐,居中,右对齐public static byte[] selectPrintTransducerOutPutPageOutSignal(int n)
n
- :0-255public static byte[] selectPrintTransducerStopPrint(int n)
n
- :0-255public static byte[] allowOrForbidPressButton(int n)
n
- :0-255,n的最后一位为0,按键启用,为1,按键禁止;public static byte[] printAndFeedForward(int n)
n
- :0-255;public static byte[] printAndFeedUnidirection(int n)
n:0-255;
- public static byte[] creatCashboxContorlPulse(int m, int t1, int t2)
m
- :连接引脚,范围:0,1,48,49;t1
- 0-255;t2
- 0-255;public static byte[] selectPrintColor(int n)
n
- :0,1,48,49;public static byte[] selectCharacterCodePage(int n)
n
- 0<=n<=10,16<=n<=19;public static byte[] selectOrCancelConvertPrintModel(int n)
n
- 最低位0取消,最低位1选择,范围:0-255;public static byte[] executePrintDataSaveByTransformToHex()
public static byte[] selectCutPagerModerAndCutPager(int m)
m
- :0,48,全切;1,49,半切public static byte[] selectCutPagerModerAndCutPager(int m, int n)
m
- :只能是66n
- :进纸n,然后半切纸public static byte[] openOrCloseAutoReturnPrintState(int n)
n
- 0-255,每一位代表不同的状态返回public static byte[] returnState(int n)
n
- 范围:1,2,49,50;public static byte[] setConnectWaitTime(int t1, int t2)
t1
- 范围:0-255;t2
- 范围:0-255public static byte[] setChineseCharacterModel(int n)
n
- :0-255;字节的不同位定义字符模式public static byte[] selectChineseCharModel()
public static byte[] selectOrCancelChineseCharUnderLineModel(int n)
n
- :0-2或48-50;public static byte[] cancelChineseCharModel()
public static byte[] definedUserDefinedChineseChar(int c2, byte[] b)
c2
- :A1H<=c2<=FEHb
- 长度为72,代表定义的汉字的数据public static byte[] cancelUserDefinedChineseChar(int c2)
c2
- 该命令取消由c1 和c2所指定的汉字字符代码定义在取消用户自定义汉字字符后打印
空白字符public static byte[] setChineseCharLeftAndRightSpace(int n1, int n2)
n1
- 设置左间距,0-255;n2
- 设置右间距,0-255;public static byte[] selectOrCancelChineseCharDoubleWH(int n)
n
- :0-255;只有最低位有效,0,取消;1,选择public static byte[] setBlackPositionRecord(int a, int m, int nL, int nH)
pL+(pH×256)≡4
- 即pL=4,pH=0a
- =1,2;m
- =0,48 或1,49nL
- 0-255, 0≤(nL+nH×256)<1700nH
- 0≤(nL+nH×256)<1700public static byte[] feedBlackPaperToPrintPosition()
public static byte[] setRollBackLength(int n)
n
- 0-255,退纸长度为 n×0.1764 毫米;public static byte[] setOrderLength(int nL, int nH)
nL
- 该命令用于设置单长度为(nL+nH×256)×0.1764 毫米,并退纸至由 ESC ^ n
设置的打印起始位置。nH
- public static byte[] feedpaperToOrderEnd()
public static byte[] printHeaderRecordAndFeedToPrintStartPosition()