![]() |
CustomAndroidAPI
1.05
|
Public Member Functions | |
void | close () throws CustomException |
int | getCommPortType () throws CustomException |
boolean | isPrinterOnline () throws CustomException |
int | getPrinterId () throws CustomException |
String | getFirmwareVersion () throws CustomException |
String | getAPIVersion () throws CustomException |
byte[] | getPrinterFullStatusBuffer () throws CustomException |
PrinterStatus | getPrinterFullStatus () throws CustomException |
String | getPrinterName () |
String | getPrinterInfo () |
int | getPageWidth () |
int | getResolution () |
long | getReadTimeout () throws CustomException |
void | setReadTimeout (int msecs) throws CustomException |
long | getWriteTimeout () throws CustomException |
void | setWriteTimeout (int msecs) throws CustomException |
void | clearReadBuffer () throws CustomException |
int[] | readData () throws CustomException |
void | writeData (int[] data) throws CustomException |
void | writeData (int[] data, int offset, int nBytes) throws CustomException |
void | writeData (byte[] data) throws CustomException |
void | writeData (byte[] data, int offset, int nBytes) throws CustomException |
void | printText (String text, int pixel_la, int pixel_w, PrinterFont font) throws CustomException |
void | printTextLF (String text, int pixel_la, int pixel_w, PrinterFont font) throws CustomException |
void | printText (String text, PrinterFont font) throws CustomException |
void | printTextLF (String text, PrinterFont font) throws CustomException |
void | printText (String text) throws CustomException |
void | printTextLF (String text) throws CustomException |
void | printImage (Bitmap image, int left_align, int widthOption, int width) throws CustomException |
void | printImage (Bitmap image) throws CustomException |
void | PrintBarcode (String brcText, int brcType, int brcHriType, int brcJustification, int brcWidth, int brcHeight) throws CustomException |
void | PrintBarcode (byte[] brcData, int nBytes, int brcType, int brcHriType, int brcJustification, int brcWidth, int brcHeight) throws CustomException |
void | PrintBarcode2D (String brcText, int brcType, int brcJustification, int brcWidth) throws CustomException |
void | PrintBarcode2D (byte[] brcData, int nBytes, int brcType, int brcJustification, int brcWidth) throws CustomException |
void | feed (int nFeeds) throws CustomException |
void | cut (int cutType) throws CustomException |
void | eject (int ejectType) throws CustomException |
void | present (int presentMM) throws CustomException |
Static Public Attributes | |
static final int | COMMTYPE_BLUETOOTH = 0 |
static final int | COMMTYPE_ETHERNET = 1 |
static final int | COMMTYPE_USB = 2 |
static final int | COMMTYPE_COM = 3 |
static final int | IMAGE_SCALE_NONE = 0 |
static final int | IMAGE_SCALE_TO_FIT = 1 |
static final int | IMAGE_SCALE_TO_WIDTH = 2 |
static final int | IMAGE_ALIGN_TO_LEFT = 0 |
static final int | IMAGE_ALIGN_TO_CENTER = -1 |
static final int | IMAGE_ALIGN_TO_RIGHT = -2 |
static final int | CUT_TOTAL = 0 |
static final int | CUT_PARTIAL = 1 |
static final int | EJ_EJECT = 0 |
static final int | EJ_RETRACT = 1 |
static final int | BARCODE_TYPE_CODABAR = -1 |
static final int | BARCODE_TYPE_UPCA = -2 |
static final int | BARCODE_TYPE_UPCE = -3 |
static final int | BARCODE_TYPE_EAN13 = -4 |
static final int | BARCODE_TYPE_EAN8 = -5 |
static final int | BARCODE_TYPE_CODE39 = -6 |
static final int | BARCODE_TYPE_ITF = -7 |
static final int | BARCODE_TYPE_CODE93 = -8 |
static final int | BARCODE_TYPE_CODE128 = -9 |
static final int | BARCODE_TYPE_CODE32 = -10 |
static final int | BARCODE_TYPE_QRCODE = -101 |
static final int | BARCODE_TYPE_PDF417 = -102 |
static final int | BARCODE_TYPE_DATAMATRIX = -103 |
static final int | BARCODE_TYPE_AZTEC = -104 |
static final int | BARCODE_HRI_NONE = 0 |
static final int | BARCODE_HRI_TOP = 1 |
static final int | BARCODE_HRI_BOTTOM = 2 |
static final int | BARCODE_HRI_TOPBOTTOM = 3 |
static final int | BARCODE_ALIGN_TO_LEFT = 0 |
static final int | BARCODE_ALIGN_TO_CENTER = -1 |
static final int | BARCODE_ALIGN_TO_RIGHT = -2 |
Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to printer, etc
|
inline |
Clears the Read Buffer
CustomException |
|
inline |
Disconnect the link and release attached resources
CustomException |
|
inline |
Sends a Cut command to the printer
cutType | cut type
|
CustomException |
|
inline |
Sends a Eject command to the printer
ejectType | eject type
|
CustomException |
|
inline |
|
inline |
|
inline |
Returns the communication port type
CustomException |
|
inline |
Sends a get Firmware version command to printer and process the response
CustomException |
|
inline |
Returns paper width in pixels / dots
|
inline |
|
inline |
|
inline |
|
inline |
Returns information about the Printer
|
inline |
Returns name/ type of the Printer
|
inline |
|
inline |
Returns Print resolution
|
inline |
|
inline |
Returns if the printer is ready or not
CustomException |
|
inline |
Sends a present command to the printer
presentMM | mm of paper to present |
CustomException |
|
inline |
Sends barcode string to printer to print
brcText | Barcode Text |
brcType | Barcode Type
|
brcHriType | Barcode HRI (Human Readable Information) Type
|
brcJustification | Barcode Justification
|
brcWidth | Barcode Width expressed in dot (referred to the narrowest bar) |
brcHeight | Barcode Height |
CustomException |
|
inline |
Sends barcode data to printer to print
brcData | Barcode Data |
nBytes | Barcode Data Size |
brcType | Barcode Type
|
brcHriType | Barcode HRI (Human Readable Information) Type
|
brcJustification | Barcode Justification
|
brcWidth | Barcode Width expressed in dot (referred to the narrowest bar) |
brcHeight | Barcode Height |
CustomException |
|
inline |
Sends barcode 2D string to printer to print
brcText | Barcode Text |
brcType | Barcode Type
|
brcJustification | Barcode Justification
|
brcWidth | Barcode external width expressed in dot |
CustomException |
|
inline |
Sends barcode 2D data to printer to print
brcData | Barcode Data |
nBytes | Barcode Data Size |
brcType | Barcode Type
|
brcJustification | Barcode Justification
|
brcWidth | Barcode external width expressed in dot |
CustomException |
|
inline |
Sends the Bitmap data to printer to print
image | Bitmap image |
left_align | the value is > 0, the value is the align Left align in pixel. If is <= 0:
|
widthOption | Scaling options
|
width | printed image width in pixel/dots (used only if widthOption=IMAGE_SCALE_TO_WIDTH) |
CustomException |
|
inline |
Sends the Bitmap data to printer to print fit to paper width
image | Bitmap image |
CustomException |
|
inline |
Sends the text data to printer to print
text | String to print |
pixel_la | Left align in pixel |
pixel_w | Print area width in pixel. Pass -1 to use max available print width |
font | Holds various font attributes |
CustomException |
|
inline |
Sends the text data to printer to print. It will print data on full page width with 0 margin
text | String to print |
font | Holds various font attributes |
CustomException |
|
inline |
Sends the text data to printer to print. It will print data on full page width with 0 margin using the last font attributes
text | String to print |
CustomException |
|
inline |
Sends the text data to printer to print and adds a LF at the end
text | String to print |
pixel_la | Left align in pixel |
pixel_w | Print area width in pixel. Pass -1 to use max available print width |
font | Holds various font attributes |
CustomException |
|
inline |
Sends the text data to printer to print and adds a LF at the end. It will print data on full page width with 0 margin
text | String to print |
font | Holds various font attributes |
CustomException |
|
inline |
Sends the text data to printer to print and adds a LF at the end. It will print data on full page width with 0 margin using the last font attributes
text | String to print |
CustomException |
|
inline |
Read Data Buffer. It will return all available data in buffer. Buffer capacity is 1024 bytes.
CustomException |
|
inline |
Sets the Read Timeout. It can be between 50-30000 milliseconds.
msecs | Read Timeout (milliseconds) |
CustomException |
|
inline |
Sets the Write Timeout. It can be between 50-30000 milliseconds.
msecs | Write Timeout (milliseconds) |
CustomException |
|
inline |
|
inline |
Write Data Buffer to printer.
data | Data Buffer to Write |
offset | Data Buffer offset |
nBytes | number of Bytes to send to printer |
CustomException |
|
inline |
|
inline |
Write Data Buffer to printer.
data | Data Buffer to Write |
offset | Data Buffer offset |
nBytes | number of Bytes to send to printer |
CustomException |
|
static |
Indicates that the Barcode Justification is Center
|
static |
Indicates that the Barcode Justification is Left
|
static |
Indicates that the Barcode Justification is Right
|
static |
Indicates HRI on BOTTOM of the Barcode
|
static |
Indicates no HRI on the Barcode
|
static |
Indicates HRI on TOP of the Barcode
|
static |
Indicates HRI on TOP and BOTTOM of the Barcode
|
static |
Indicates to print a AZTEC Barcode 2D
|
static |
Indicates to print a CODEBAR Barcode
|
static |
Indicates to print a CODE128 Barcode
|
static |
Indicates to print a CODE32 Barcode
|
static |
Indicates to print a CODE39 Barcode
|
static |
Indicates to print a CODE93 Barcode
|
static |
Indicates to print a DATAMATRIX Barcode 2D
|
static |
Indicates to print a EAN13 Barcode
|
static |
Indicates to print a EAN8 Barcode
|
static |
Indicates to print a ITF Barcode
|
static |
Indicates to print a PDF417 Barcode 2D
|
static |
Indicates to print a QRCODE Barcode 2D
|
static |
Indicates to print a UPCA Barcode
|
static |
Indicates to print a UPCE Barcode
|
static |
Indicates that the communication port is a BLUETOOTH
|
static |
Indicates that the communication port is a COM/TTY
|
static |
Indicates that the communication port is a ETHERNET / WIFI
|
static |
Indicates that the communication port is a USB
|
static |
Indicates to perform a Partial Cut
|
static |
Indicates to perform a Total Cut
|
static |
Indicates to perform a Eject
|
static |
Indicates to perform a Retract
|
static |
Indicates that the Picture Justification is Center
|
static |
Indicates that the Picture Justification is Left
|
static |
Indicates that the Picture Justification is Right
|
static |
Indicates that the Picture will be No scaling. Excess size will be ignored
|
static |
Indicates that the Picture will be Scale to fit the paper width
|
static |
Indicates that the Picture will be Scale the image to width given by width parameter