public class DataForSendToPrinterPos58
extends java.lang.Object
| Constructor and Description |
|---|
DataForSendToPrinterPos58() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
allowOrForbidPressButton(int n)
Enable or disable button
ESC c 5 n
|
static byte[] |
CancelChineseCharModel()
cancel chinese-char model
FS .
|
static byte[] |
cancelUserDefinedCharacters(int n)
Cancel user-defined characters
ESC ? n
Cancel the user-defined characters in the code for the n character
|
static byte[] |
creatCashboxContorlPulse(int m,
int t1,
int t2)
creat cashbox contorl pulse
ESC p m t1 t2
|
static byte[] |
definedDownLoadBmp(android.graphics.Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
defined downLoad bitmap
GS x y [ d1...d(xy*8)]
single bitmap £ºn=(width+7)/8;h=(height+7)/8;n*h<=912,1<=n<=255,1<=h<=48,or else return new byte[0].
|
static byte[] |
definedFlashBmp(java.util.List<android.graphics.Bitmap> list,
int n,
BitmapToByteData.BmpType bmpType)
defined Flash bitmap
FS q n [xL xH yL yH d1...dk]...[xL xH yL yH d1...dk]
The maximum FLASH of storage space for 8KB£¬[xL xH yL yH d1...dk]...[xL xH yL yH d1...dk] The sum of not more than8096
single bitmap£ºn=(width+7)/8;h=(height+7)/8;n*h<=1023,1<=n<=1023,1<=h<=288,or return new byte[0].
|
static byte[] |
definedUserDefinedChineseChar(int c2,
byte[] b)
defined user-defined chinese character
FS 2 c1 c2 d1...dk
|
static byte[] |
defineuserDefinedCharacters(int c1,
int c2,
byte[] b)
Define the user defined chararcters
ESC $ Y c1 c2 [x1 d1...d(x1*y)]...[xk d1...d(y*xk)]
|
static byte[] |
horizontalPositioning()
horizontal orientation command
HT
|
static byte[] |
initializePrinter()
Initialize printer
ESC @
|
static byte[] |
printAndFeed(int n)
print and feed
ESC J n
|
static byte[] |
printAndFeedForward(int n)
print and feed forward
ESC d n
|
static byte[] |
printAndFeedLine()
print and feed command
LF
|
static byte[] |
printBarcode(int m,
int n,
java.lang.String content)
print barcode
GS k m n d1...dn
|
static byte[] |
printBarcode(int m,
java.lang.String content)
print barcode
GS k m d1...dk NUL
|
static byte[] |
printBmpInFLASH(int n,
int m)
print bitmap in FLASH
FS p n m
|
static byte[] |
printDownLoadBmp(int m)
print download bitmap
GS / m
|
static byte[] |
printRasterBmp(int m,
android.graphics.Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
print raster bitmap
GS v 0 m
|
static byte[] |
queryPrinterState()
check the printer state
ESC v
only work for serial interface and ethernet interface
|
static byte[] |
selectAlignment(int n)
Select alignment
ESC a n
|
static byte[] |
selectBmpModel(int m,
int nL,
int nH,
byte[] b)
Select the bitmap mode
ESC * m nL nH d1 d2...dk
|
static byte[] |
selectCharacterCodePage(int n)
select character codepage
ESC t n
|
static byte[] |
selectCharacterSize(int n)
Select a character size
GS ! n
|
static byte[] |
selectChineseCharModel()
select chinese-char model
FS &
|
static byte[] |
selectFont(int n)
Select Font
ESC M n
|
static byte[] |
selectHRICharacterPrintPosition(int n)
select HRI character of barcode position to print
GS H n
HRI is the explanation of the barcode content
GS H n
|
static byte[] |
selectHRIFont(int n)
select HRI font type for the barcode content
GS f n
|
static byte[] |
selectInternationalCharacterSets(int n)
select international character sets
ESC R n
|
static byte[] |
selectOrCancelBoldModel(int n)
Select or cancel the bold model
ESC E n
|
static byte[] |
selectOrCancelChineseCharDoubleWH(int n)
select or cancel chinese double width and height
FS W n
|
static byte[] |
selectOrCancelChineseCharUnderLineModel(int n)
select or cancel chinese-char underline model
FS - n
|
static byte[] |
selectOrCancelConvertPrintModel(int n)
select or cancel convert print model
ESC { n
|
static byte[] |
selectOrCancelCW90(int n)
Select or cancel 90 degrees clockwise
This command is available only in page mode
ESC V n
|
static byte[] |
selectOrCancelDoubelPrintModel(int n)
Select or cancel double print mode
ESC G n
|
static byte[] |
selectOrCancelInvertPrintModel(int n)
select or cancel invert print mode
GS B n
|
static byte[] |
selectOrCancelUnderlineModel(int n)
Select or cancel underline mode
ESC-n
|
static byte[] |
selectOrCancleCustomChar(int n)
Select or cancel user-defined characters
ESC % n
|
static byte[] |
selectPrintModel(int n)
select print model
ESC £¡n
|
static byte[] |
setAbsolutePrintPosition(int m,
int n)
Set the absolute print position
ESC $ nL nH
|
static byte[] |
setBarcodeHeight(int n)
set barcode height
GS h n
|
static byte[] |
setBarcodeWidth(int n)
set barcode width
GS w n
|
static byte[] |
setCharRightSpace(int n)
seting the right side space of the character string
ESC SP n
|
static byte[] |
setChineseCharacterModel(int n)
set chinese-char model
FS ! n
|
static byte[] |
setChineseCharLeftAndRightSpace(int n1,
int n2)
setting chinese character left and right space
FS S n1 n2
|
static byte[] |
setDefultLineSpacing()
Set the default line spacing
ESC 2
about 3.75mm
|
static byte[] |
setHorizontalAndVerticalMoveUnit(int x,
int y)
setting the positon of content horizontal and vertical move
GS P x y
|
static byte[] |
setHorizontalmovementPosition(byte[] b)
Set the horizontal movement position
ESC D n1...nk NUL;
|
static byte[] |
setLeftSpace(int nL,
int nH)
set left space
GS L nL nH
|
static byte[] |
setLineSpaceing(int n)
set line spaceing
ESC 3 n
|
static byte[] |
setPrintAreaWidth(int nL,
int nH)
setting the width of print area
GS W nL nH
|
static byte[] |
setRelativeHorizontalPrintPosition(int nL,
int nH)
set relative horizontal print position
Please refer to the details of programming instruction manual
ESC \ nL nH
|
static byte[] |
strTobytes(java.lang.String str)
string to byte[]
|
public static byte[] horizontalPositioning()
public static byte[] printAndFeedLine()
public static byte[] setCharRightSpace(int n)
n, - On behalf of the distance between the size of the variable(range:0-255)£»public static byte[] selectPrintModel(int n)
n - for print mode variable,(range:0-255)public static byte[] setAbsolutePrintPosition(int m,
int n)
m£¬n£¬m+n*256:The - location of the representatives from the beginning of a line,(range:0-255).public static byte[] selectOrCancleCustomChar(int n)
n£¬0-255£¬The - lowest is 1, use; 0, do not use£»public static byte[] defineuserDefinedCharacters(int c1,
int c2,
byte[] b)
c1£¬c2£¬c1:start - of the character£¬c2:end of the character£¬(range:32<=c1<=c2<=127);b£¬The - format of the set b is [x1 d1...d(x1*y)]...[xk d1...d(y*xk)]£¬Set B for download character character data, character rules for details, please refer to the programming manual;public static byte[] selectBmpModel(int m,
int nL,
int nH,
byte[] b)
m£º0,1,32£¬33,Different - representative point densitynL£º0-255 - nH£º0-3 - b£¬b={d1 - d2...dk}£¬m=0 or 1,k=nL+nH*256;m=32 or 33,k=(nL+nH*256)*3;0<=d<=255;
Please refer to the instruction manual programmingpublic static byte[] selectOrCancelUnderlineModel(int n)
n:0,48 - Cancel the underline£»1,49 underlined (1 points wide); 2,50 (2 bit wide) underline£©;public static byte[] setDefultLineSpacing()
public static byte[] setLineSpaceing(int n)
n - ranges£º0-255public static byte[] cancelUserDefinedCharacters(int n)
n - ranges:32-127public static byte[] initializePrinter()
public static byte[] setHorizontalmovementPosition(byte[] b)
b={n1...nk};k<=32;Jump - distance = character width *n£»
The number and size of the b parameter settings refer to the programming manualpublic static byte[] selectOrCancelBoldModel(int n)
n£¬0-255£¬The - lowest is 1, bold; 0, cancel.public static byte[] selectOrCancelDoubelPrintModel(int n)
n£¬0-255£¬The - lowest is 1, double choose print; the lowest is 0, cancel the double printpublic static byte[] printAndFeed(int n)
n - ranges£º0-255public static byte[] selectFont(int n)
n - £º0£¬1£¬48£¬49£»0£¬48 standard font£»1£¬49 compress fontpublic static byte[] selectInternationalCharacterSets(int n)
n£º0-15£»A - representative of an international character setpublic static byte[] selectOrCancelCW90(int n)
n:0<=n<=1,48<=n<=49;0,48cancel£¬1,49 - choosepublic static byte[] setRelativeHorizontalPrintPosition(int nL,
int nH)
nL,nH - ranges£º0-255public static byte[] selectAlignment(int n)
n:0-2 - or 48-50£»Respectively: left aligned, centered, right alignedpublic static byte[] allowOrForbidPressButton(int n)
n£º0-255£¬The - lowest is 0£¬button ennable ;The lowest is 1,button disable£»public static byte[] printAndFeedForward(int n)
n:0-255£» - public static byte[] creatCashboxContorlPulse(int m,
int t1,
int t2)
m - £ºConnecting pin,ranges£º0,1,48,49£»t1,t2£º0-255 - public static byte[] selectCharacterCodePage(int n)
n£º0<=n<=10,16<=n<=19; - public static byte[] selectOrCancelConvertPrintModel(int n)
n£ºThe - lowest is 0 ,cancel;the lowest is 1 ,choose,ranges£º0-255£»public static byte[] printBmpInFLASH(int n,
int m)
n£¬Bitmap - representation£¬0-255m£º0-3 - or 48-51public static byte[] definedFlashBmp(java.util.List<android.graphics.Bitmap> list,
int n,
BitmapToByteData.BmpType bmpType)
list - bitmap list£¬The bitmap object stored in the flash ,list is null or size is 0£¬return a new byte[0]£»n - the size of listbmptype - The type you want to print the bitmap,Threshold and Ditheringpublic static byte[] selectCharacterSize(int n)
n - :0-255£»n: 0-3 set the height of the characters, 4-7 is used to set the width of the characterspublic static byte[] definedDownLoadBmp(android.graphics.Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
bitmap - You want to download the bitmap to the printerbmptype - The type you want to print the bitmap,Threshold and Ditheringpublic static byte[] printDownLoadBmp(int m)
m£¬The - specified print mode£¬ranges£º0-3 or 48-51£»public static byte[] selectOrCancelInvertPrintModel(int n)
n£º0-255£¬The - lowest is 0 ,cancel;the lowest is 1 ,choosepublic static byte[] selectHRICharacterPrintPosition(int n)
n - (range:0-3 or 48-51£»position of the barcode content)public static byte[] setLeftSpace(int nL,
int nH)
nL£¬nH£¬range:0-255£¬£¨nl+nh*256£© - horizontal movement represent left space. unit: inchpublic static byte[] setHorizontalAndVerticalMoveUnit(int x,
int y)
x: - param of horizonatal£¬range:0-255y: - param of vertical , range :0-255
x=0 and y=0,x,y are set to the default valuepublic static byte[] setPrintAreaWidth(int nL,
int nH)
(nl+nh*256)*Lateral - movement unit£¬width of print areapublic static byte[] selectHRIFont(int n)
n - £º(0,48 : standard);(1,49:compression)public static byte[] setBarcodeHeight(int n)
n - £º1-255;defaul :162public static byte[] printBarcode(int m,
java.lang.String content)
m,barcode - type£º0-6,65-73£¬when m=73,content must add the selection of charset , such as £º{A£¬{B£¬{C ...£»content - :string content of the barcode.
The size and the range of the string should refer to instruction set of barcode printpublic static byte[] printBarcode(int m,
int n,
java.lang.String content)
m,barcode - type£º0-6,65-73£¬when m=73,content must add the selection of charset , such as £º{A£¬{B£¬{C ...£»n - limitation of data lenght. size of content can not exceed the ncontent - :string content of the barcode.
The size and the range of the string should refer to instruction set of barcode printpublic static byte[] printRasterBmp(int m,
android.graphics.Bitmap bitmap,
BitmapToByteData.BmpType bmpType)
m - :(print type:0-3 or 48-51 ;defaul typem=0;)bitmap - bitmap (please refer to to Programming manual by using this API)bmpType - Processing into a single color bitmappublic static byte[] setBarcodeWidth(int n)
n - range:2-6;default:3£»public static byte[] setChineseCharacterModel(int n)
n:0-255£»diferent - location of the byte represent diferent char modelpublic static byte[] selectChineseCharModel()
public static byte[] selectOrCancelChineseCharUnderLineModel(int n)
n£º0-2 - or 48-50£»public static byte[] CancelChineseCharModel()
public static byte[] definedUserDefinedChineseChar(int c2,
byte[] b)
c2:A1H<=c2<=FEH - b,length:72£¬ - data size of the user-defined chinese character.public static byte[] setChineseCharLeftAndRightSpace(int n1,
int n2)
n1:left - space£¬(range:0-255)n2:right - space£¬(range:0-255)public static byte[] selectOrCancelChineseCharDoubleWH(int n)
n£º0-255£»only - the lowest order bit effect .(0:cancel;1:select)public static byte[] queryPrinterState()
public static byte[] strTobytes(java.lang.String str)