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()