public class ZplCmd extends Cmd
| Constructor and Description |
|---|
ZplCmd() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
getAllCutCmd()
For Esc
全切 All cut |
byte[] |
getBarcodeCmd(BarcodeType barcodeType,
BarcodeSetting barcodeSetting,
java.lang.String barcodeContent)
Get Barcode Printing command
获取条码打印指令(含二维码) |
byte[] |
getBeepCmd()
For Esc
蜂鸣 Beep |
byte[] |
getBitmapCmd(BitmapSetting bitmapSetting,
android.graphics.Bitmap bitmap)
获取图片打印的指令
Get Bitmap printing command |
byte[] |
getCommonSettingCmd(CommonSetting commonSetting)
获取通用设置的指令
Common Setting command |
byte[] |
getCpclHeaderCmd(int pageHigh,
int pageWidth,
int printCopies,
int offset)
For Cpcl Inital Command
|
byte[] |
getCRCmd()
\r 回车
Enter |
byte[] |
getDrawBox(int x0,
int y0,
int x1,
int y1,
int lineWidth)
Draw Box.[For TSC, CPCL, ZPL]
|
byte[] |
getDrawLine(int x0,
int y0,
int x1,
int y1,
int lineWidth)
For TSC, CPCL, ZPL
Draw a line.[only support Horizontal lines and straight lines]. |
byte[] |
getEndCmd()
获取结束指令(针打则为退纸)
End command |
byte[] |
getHalfCutCmd()
For Esc
半切 Half cut |
byte[] |
getHeaderCmd()
获取指令头(通常是打印机初始化指令)
Get header commands Tsc: CLS command , clear cache Esc/Pin: printer initialization |
byte[] |
getLFCmd()
\n 换行
Wrap |
byte[] |
getLFCRCmd()
换行+回车
Wrap + Enter |
byte[] |
getOpenMoneyBoxCmd()
For Esc
钱箱 Open Money Box |
byte[] |
getPrintCopies(int printCopies)
设置打印份数,Print Copies Setting(For Tsc)
|
byte[] |
getReverse(int x0,
int y0,
int x1,
int y1)
For TSC
功能:将图像缓存中指定的区域做反相的动作 Function: Invert the specified area in the image buffer |
byte[] |
getSelfTestCmd()
打印自测页
Test page print
|
byte[] |
getTextCmd(TextSetting textSetting,
java.lang.String text)
获取文本打印的指令
Print text command |
byte[] |
getTextCmd(TextSetting textSetting,
java.lang.String text,
java.lang.String chartSetName)
获取文本打印的指令
Print text command |
java.lang.String |
getZplSumCmds()
private end
|
append, arrayAddToList, clear, getAppendCmds, getChartsetName, getOpenMoneyBoxCmd, getPrint80StausCmd, getPrintStausCmd, getVerifiedStr, listToArray, setChartsetNamepublic byte[] getSelfTestCmd()
CmdgetSelfTestCmd in class Cmdpublic byte[] getHeaderCmd()
CmdgetHeaderCmd in class Cmdpublic byte[] getCpclHeaderCmd(int pageHigh,
int pageWidth,
int printCopies,
int offset)
CmdgetCpclHeaderCmd in class CmdpageHigh - In-mmpageWidth - In-mmprintCopies - range: 0 ~ npublic byte[] getPrintCopies(int printCopies)
CmdgetPrintCopies in class CmdprintCopies - Default:1public byte[] getEndCmd()
Cmdpublic byte[] getLFCmd()
Cmdpublic byte[] getCRCmd()
Cmdpublic byte[] getLFCRCmd()
CmdgetLFCRCmd in class Cmdpublic byte[] getCommonSettingCmd(CommonSetting commonSetting)
CmdgetCommonSettingCmd in class Cmdpublic byte[] getTextCmd(TextSetting textSetting, java.lang.String text, java.lang.String chartSetName) throws java.io.UnsupportedEncodingException
CmdgetTextCmd in class CmdtextSetting - 文本设置, Text Settingtext - 文本内容,ContentchartSetName - 文本编码,GBK[Default]、UTF-8java.io.UnsupportedEncodingExceptionpublic byte[] getTextCmd(TextSetting textSetting, java.lang.String text) throws java.io.UnsupportedEncodingException
CmdgetTextCmd in class CmdtextSetting - 文本设置text - 文本内容,编码使用 chartsetName设置,默认为GBK, chartsetname setting, default:GBKjava.io.UnsupportedEncodingExceptionpublic byte[] getBitmapCmd(BitmapSetting bitmapSetting, android.graphics.Bitmap bitmap)
CmdgetBitmapCmd in class CmdbitmapSetting - 图片设置(限宽), Bitmap setting (width limit)bitmap - 要打印的图片 the bitmap which to printpublic byte[] getBarcodeCmd(BarcodeType barcodeType, BarcodeSetting barcodeSetting, java.lang.String barcodeContent) throws SdkException
CmdgetBarcodeCmd in class CmdbarcodeType - 条码类型barcodeSetting - 条码设置barcodeContent - 条码内容SdkExceptionpublic byte[] getBeepCmd()
CmdgetBeepCmd in class Cmdpublic byte[] getAllCutCmd()
CmdgetAllCutCmd in class Cmdpublic byte[] getHalfCutCmd()
CmdgetHalfCutCmd in class Cmdpublic byte[] getDrawLine(int x0,
int y0,
int x1,
int y1,
int lineWidth)
CmdgetDrawLine in class Cmdx0 - start coordinate-xy0 - start coordinate-yx1 - end coordinate-xy1 - end coordinate-ylineWidth - line width in Dot.public byte[] getDrawBox(int x0,
int y0,
int x1,
int y1,
int lineWidth)
CmdgetDrawBox in class Cmdx0 - left-top of box coordinate-xy0 - left-top of box coordinate-yx1 - right-bottom of box coordinate-xy1 - right-bottom of box coordinate-ylineWidth - the line width of box, in dot.public byte[] getOpenMoneyBoxCmd()
CmdgetOpenMoneyBoxCmd in class Cmdpublic java.lang.String getZplSumCmds()
public byte[] getReverse(int x0,
int y0,
int x1,
int y1)
CmdgetReverse in class Cmdx0 - start coordinate-xy0 - start coordinate-yx1 - end coordinate-xy1 - end coordinate-y