CustomAndroidAPI  1.11
 All Classes Namespaces Functions Variables Pages
it.custom.printer.api.android.CustomPrinter Class Reference

Public Member Functions

void close () throws CustomException
 
int getCommPortType () throws CustomException
 
boolean isPrintAvailable ()
 
boolean isScannerAvailable ()
 
boolean isVeriprintAvailable ()
 
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
 
byte[] scannerGetFullStatusBuffer () throws CustomException
 
ScannerStatus scannerGetFullStatus () throws CustomException
 
void scannerCleanBuffers () throws CustomException
 
void scannerFeeder (int iFeeder) throws CustomException
 
ScannerImage scannerGetImage (int iImageType, boolean bCropImage) throws CustomException
 
Bitmap scannerGetImageVeriprint () throws CustomException
 
byte[] scannerGetBarcode () throws CustomException
 
boolean scannerPrintBarcodeAndVerify (String brcText, int brcType, int brcHriType, int brcJustification, int brcWidth, int brcHeight) throws CustomException
 
boolean scannerPrintBarcodeAndVerify (byte[] brcData, int nBytes, int brcType, int brcHriType, int brcJustification, int brcWidth, int brcHeight) throws CustomException
 
ScannerCardData scannerGetCardData () throws CustomException
 
int scannerGetImageScannedID () throws CustomException
 
void scannerSetSearchType (int iSearchTypes, boolean bSaveOnlyToRam) throws CustomException
 
void scannerSetEndScanMovement (int iAutoMType) throws CustomException
 
void scannerEject (int iEjectType) throws CustomException
 
void scannerVoidTicket (Bitmap image, int iOffsetMM) throws CustomException
 
void scannerVoidBarcode (Bitmap image) throws CustomException
 
int[] scannerGetThresholds () throws CustomException
 
void scannerSetThresholds (int ithHW, int ithSW) throws CustomException
 
boolean scannerProgramTickets (byte[] bBufferRicketsFile, boolean bSaveOnlyToRam) 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
 
static final int SCANNER_FEEDER_ENABLE = 1
 
static final int SCANNER_FEEDER_DISABLE = 0
 
static final int SCANNER_IMAGE_GRAY_256 = 1
 
static final int SCANNER_IMAGE_BW = 2
 
static final int SCANNER_SEARCH_NONE = 0
 
static final int SCANNER_SEARCH_TYPE_CARD = 1
 
static final int SCANNER_SEARCH_TYPE_BARCODE = 2
 
static final int SCANNER_SEARCH_TYPE_CARD_AND_BARCODE = 3
 
static final int SCANNER_AUTOM_HOLD = 0x30
 
static final int SCANNER_AUTOM_RETRACT = 0x31
 
static final int SCANNER_AUTOM_EJECT = 0x32
 
static final int SCANNER_EJ_RETRACT = 0x31
 
static final int SCANNER_EJ_EJECT = 0x32
 

Detailed Description

Class definition for CUSTOM printers. Defines functionality to print text/image, read/write data to printer, etc

Member Function Documentation

void it.custom.printer.api.android.CustomPrinter.clearReadBuffer ( ) throws CustomException
inline

Clears the Read Buffer

Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.close ( ) throws CustomException
inline

Disconnect the link and release attached resources

Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.cut ( int  cutType) throws CustomException
inline

Sends a Cut command to the printer

Parameters
cutTypecut type
  • CUT_TOTAL - Perform a Total Cut.
  • CUT_PARTIAL - Perform a Partial Cut.
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.eject ( int  ejectType) throws CustomException
inline

Sends a Eject command to the printer

Parameters
ejectTypeeject type
  • EJ_EJECT - Perform a Eject.
  • EJ_RECTRACT - Perform a Retract.
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.feed ( int  nFeeds) throws CustomException
inline

Sends Feeds to the printer

Parameters
nFeedsnumber of LF to send
Exceptions
CustomException
String it.custom.printer.api.android.CustomPrinter.getAPIVersion ( ) throws CustomException
inline

Current API version

Returns
current API version eg 1.00
Exceptions
CustomException
int it.custom.printer.api.android.CustomPrinter.getCommPortType ( ) throws CustomException
inline

Returns the communication port type

Returns
the communication port type
  • COMMTYPE_BLUETOOTH for Bluetooth.
  • COMMTYPE_ETHERNET for Ethernet.
  • COMMTYPE_USB for Usb.
  • COMMTYPE_COM for RS232.
Exceptions
CustomException
String it.custom.printer.api.android.CustomPrinter.getFirmwareVersion ( ) throws CustomException
inline

Sends a get Firmware version command to printer and process the response

Returns
String with 4 characters Firmware version installed on printer eg 1.08
Exceptions
CustomException
int it.custom.printer.api.android.CustomPrinter.getPageWidth ( )
inline

Returns paper width in pixels / dots

Returns
Paper width for printer in pixels / dots
PrinterStatus it.custom.printer.api.android.CustomPrinter.getPrinterFullStatus ( ) throws CustomException
inline

Returns the status of the printer

Returns
PrinterStatus with full status
Exceptions
CustomException
byte [] it.custom.printer.api.android.CustomPrinter.getPrinterFullStatusBuffer ( ) throws CustomException
inline

Returns the status of the printer

Returns
4 bytes full status
Exceptions
CustomException
int it.custom.printer.api.android.CustomPrinter.getPrinterId ( ) throws CustomException
inline

Returns the printer ID

Returns
Printer ID
Exceptions
CustomException
String it.custom.printer.api.android.CustomPrinter.getPrinterInfo ( )
inline

Returns information about the Printer

Returns
formation about the Printer
String it.custom.printer.api.android.CustomPrinter.getPrinterName ( )
inline

Returns name/ type of the Printer

Returns
name/ type for the Printer
long it.custom.printer.api.android.CustomPrinter.getReadTimeout ( ) throws CustomException
inline

Returns the Read Timeout

Returns
Read Timeout (milliseconds)
Exceptions
CustomException
int it.custom.printer.api.android.CustomPrinter.getResolution ( )
inline

Returns Print resolution

Returns
Print resolution
long it.custom.printer.api.android.CustomPrinter.getWriteTimeout ( ) throws CustomException
inline

Returns the Write Timeout

Returns
Write Timeout (milliseconds)
Exceptions
CustomException
boolean it.custom.printer.api.android.CustomPrinter.isPrintAvailable ( )
inline

Returns if the printer supports print functions

Returns
true if printer supports print functions else false
boolean it.custom.printer.api.android.CustomPrinter.isPrinterOnline ( ) throws CustomException
inline

Returns if the printer is ready or not

Returns
true if printer is online else false
Exceptions
CustomException
boolean it.custom.printer.api.android.CustomPrinter.isScannerAvailable ( )
inline

Returns if the printer supports scanner functions

Returns
true if printer supports scanner functions else false
boolean it.custom.printer.api.android.CustomPrinter.isVeriprintAvailable ( )
inline

Returns if the printer supports Veriprint functions

Returns
true if printer supports Veriprint functions else false
void it.custom.printer.api.android.CustomPrinter.present ( int  presentMM) throws CustomException
inline

Sends a present command to the printer

Parameters
presentMMmm of paper to present
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printBarcode ( String  brcText,
int  brcType,
int  brcHriType,
int  brcJustification,
int  brcWidth,
int  brcHeight 
) throws CustomException
inline

Sends barcode string to printer to print

Parameters
brcTextBarcode Text
brcTypeBarcode Type
  • BARCODE_TYPE_CODABAR - Indicates to print a CODEBAR Barcode
  • BARCODE_TYPE_UPCA - Indicates to print a UPCA Barcode
  • BARCODE_TYPE_UPCE - Indicates to print a UPCE Barcode
  • BARCODE_TYPE_EAN13 - Indicates to print a EAN13 Barcode
  • BARCODE_TYPE_EAN8 - Indicates to print a EAN8 Barcode
  • BARCODE_TYPE_CODE39 - Indicates to print a CODE39 Barcode
  • BARCODE_TYPE_ITF - Indicates to print a ITF Barcode
  • BARCODE_TYPE_CODE93 - Indicates to print a CODE93 Barcode
  • BARCODE_TYPE_CODE128 - Indicates to print a CODE128 Barcode
  • BARCODE_TYPE_CODE32 - Indicates to print a CODE32 Barcode
brcHriTypeBarcode HRI (Human Readable Information) Type
  • BARCODE_HRI_NONE - Indicates no HRI on the Barcode
  • BARCODE_HRI_TOP - Indicates HRI on TOP of the Barcode
  • BARCODE_HRI_BOTTOM - Indicates HRI on BOTTOM of the Barcode
  • BARCODE_HRI_TOPBOTTOM - Indicates HRI on TOP and BOTTOM of the Barcode
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode Width expressed in dot (referred to the narrowest bar)
brcHeightBarcode Height
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printBarcode ( byte[]  brcData,
int  nBytes,
int  brcType,
int  brcHriType,
int  brcJustification,
int  brcWidth,
int  brcHeight 
) throws CustomException
inline

Sends barcode data to printer to print

Parameters
brcDataBarcode Data
nBytesBarcode Data Size
brcTypeBarcode Type
  • BARCODE_TYPE_CODABAR - Indicates to print a CODEBAR Barcode
  • BARCODE_TYPE_UPCA - Indicates to print a UPCA Barcode
  • BARCODE_TYPE_UPCE - Indicates to print a UPCE Barcode
  • BARCODE_TYPE_EAN13 - Indicates to print a EAN13 Barcode
  • BARCODE_TYPE_EAN8 - Indicates to print a EAN8 Barcode
  • BARCODE_TYPE_CODE39 - Indicates to print a CODE39 Barcode
  • BARCODE_TYPE_ITF - Indicates to print a ITF Barcode
  • BARCODE_TYPE_CODE93 - Indicates to print a CODE93 Barcode
  • BARCODE_TYPE_CODE128 - Indicates to print a CODE128 Barcode
  • BARCODE_TYPE_CODE32 - Indicates to print a CODE32 Barcode
brcHriTypeBarcode HRI (Human Readable Information) Type
  • BARCODE_HRI_NONE - Indicates no HRI on the Barcode
  • BARCODE_HRI_TOP - Indicates HRI on TOP of the Barcode
  • BARCODE_HRI_BOTTOM - Indicates HRI on BOTTOM of the Barcode
  • BARCODE_HRI_TOPBOTTOM - Indicates HRI on TOP and BOTTOM of the Barcode
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode Width expressed in dot (referred to the narrowest bar)
brcHeightBarcode Height
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printBarcode2D ( String  brcText,
int  brcType,
int  brcJustification,
int  brcWidth 
) throws CustomException
inline

Sends barcode 2D string to printer to print

Parameters
brcTextBarcode Text
brcTypeBarcode Type
  • BARCODE_TYPE_QRCODE - Indicates to print a QRCODE Barcode 2D
  • BARCODE_TYPE_PDF417 - Indicates to print a PDF417 Barcode 2D
  • BARCODE_TYPE_DATAMATRIX - Indicates to print a DATAMATRIX Barcode 2D
  • BARCODE_TYPE_AZTEC - Indicates to print a AZTEC Barcode 2D
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode external width expressed in dot
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printBarcode2D ( byte[]  brcData,
int  nBytes,
int  brcType,
int  brcJustification,
int  brcWidth 
) throws CustomException
inline

Sends barcode 2D data to printer to print

Parameters
brcDataBarcode Data
nBytesBarcode Data Size
brcTypeBarcode Type
  • BARCODE_TYPE_QRCODE - Indicates to print a QRCODE Barcode 2D
  • BARCODE_TYPE_PDF417 - Indicates to print a PDF417 Barcode 2D
  • BARCODE_TYPE_DATAMATRIX - Indicates to print a DATAMATRIX Barcode 2D
  • BARCODE_TYPE_AZTEC - Indicates to print a AZTEC Barcode 2D
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode external width expressed in dot
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printImage ( Bitmap  image,
int  left_align,
int  widthOption,
int  width 
) throws CustomException
inline

Sends the Bitmap data to printer to print

Parameters
imageBitmap image
left_alignthe value is > 0, the value is the align Left align in pixel. If is <= 0:
  • IMAGE_ALIGN_TO_LEFT - align the print to the left.
  • IMAGE_ALIGN_TO_CENTER - align the print to the center.
  • IMAGE_ALIGN_TO_RIGHT - align the print to the right.
widthOptionScaling options
  • IMAGE_SCALE_NONE - No scaling. Excess size will be ignored.
  • IMAGE_SCALE_TO_FIT - Scale to fit the paper width(see getPageWidth).
  • IMAGE_SCALE_TO_WIDTH - Scale the image to width given by width parameter.
widthprinted image width in pixel/dots (used only if widthOption=IMAGE_SCALE_TO_WIDTH)
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printImage ( Bitmap  image) throws CustomException
inline

Sends the Bitmap data to printer to print fit to paper width

Parameters
imageBitmap image
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printText ( String  text,
int  pixel_la,
int  pixel_w,
PrinterFont  font 
) throws CustomException
inline

Sends the text data to printer to print

Parameters
textString to print
pixel_laLeft align in pixel
pixel_wPrint area width in pixel. Pass -1 to use max available print width
fontHolds various font attributes
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printText ( String  text,
PrinterFont  font 
) throws CustomException
inline

Sends the text data to printer to print. It will print data on full page width with 0 margin

Parameters
textString to print
fontHolds various font attributes
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printText ( String  text) throws 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

Parameters
textString to print
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printTextLF ( String  text,
int  pixel_la,
int  pixel_w,
PrinterFont  font 
) throws CustomException
inline

Sends the text data to printer to print and adds a LF at the end

Parameters
textString to print
pixel_laLeft align in pixel
pixel_wPrint area width in pixel. Pass -1 to use max available print width
fontHolds various font attributes
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printTextLF ( String  text,
PrinterFont  font 
) throws 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

Parameters
textString to print
fontHolds various font attributes
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.printTextLF ( String  text) throws 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

Parameters
textString to print
Exceptions
CustomException
int [] it.custom.printer.api.android.CustomPrinter.readData ( ) throws CustomException
inline

Read Data Buffer. It will return all available data in buffer. Buffer capacity is 1024 bytes.

Returns
byte data read from printer
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerCleanBuffers ( ) throws CustomException
inline

Clean scanner buffers

Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerEject ( int  iEjectType) throws CustomException
inline

Sends a Eject command to the scanner

Parameters
iEjectTypeEject Type
  • SCANNER_EJ_RETRACT - Perform a Retract.
  • SCANNER_EJ_EJECT - Perform a Eject.
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerFeeder ( int  iFeeder) throws CustomException
inline

Enable / Disable the scanner feeder

Parameters
iFeederfeeder
  • SCANNER_FEEDER_ENABLE - Enable Feeder (Allow scan).
  • SCANNER_FEEDER_DISABLE - Disable Feeder (Disallow scan).
Exceptions
CustomException
byte [] it.custom.printer.api.android.CustomPrinter.scannerGetBarcode ( ) throws CustomException
inline

Returns the last barcode read

Returns
last barcode read
Exceptions
CustomException
ScannerCardData it.custom.printer.api.android.CustomPrinter.scannerGetCardData ( ) throws CustomException
inline

Returns the last data from card read

Returns
ScannerCardData Object with all the information about the card and the data read
Exceptions
CustomException
ScannerStatus it.custom.printer.api.android.CustomPrinter.scannerGetFullStatus ( ) throws CustomException
inline

Returns the status of the scanner

Returns
ScannerStatus with full status
Exceptions
CustomException
byte [] it.custom.printer.api.android.CustomPrinter.scannerGetFullStatusBuffer ( ) throws CustomException
inline

Returns the status of the scanner

Returns
4 bytes full status
Exceptions
CustomException
ScannerImage it.custom.printer.api.android.CustomPrinter.scannerGetImage ( int  iImageType,
boolean  bCropImage 
) throws CustomException
inline

Returns the last scanned image

Parameters
iImageTypeImage
  • SCANNER_IMAGE_GRAY_256 - Get Image with 256 gray levels.
  • SCANNER_IMAGE_BW - Get Image Black & White.
bCropImageget the Image cropped
Returns
last scanned image
Exceptions
CustomException
int it.custom.printer.api.android.CustomPrinter.scannerGetImageScannedID ( ) throws CustomException
inline

Returns the current progressive Image ID

Returns
current progressive Image ID
Exceptions
CustomException
Bitmap it.custom.printer.api.android.CustomPrinter.scannerGetImageVeriprint ( ) throws CustomException
inline

Returns the last scanned veriprint image

Returns
last scanned verirpint image
Exceptions
CustomException
int [] it.custom.printer.api.android.CustomPrinter.scannerGetThresholds ( ) throws CustomException
inline

Returns a buffer of 2 elements with the Threshold HW (1st element) and Threshold SW (2nd element)

Returns
int buffer of 2 elements with Threshold values
Exceptions
CustomException
boolean it.custom.printer.api.android.CustomPrinter.scannerPrintBarcodeAndVerify ( String  brcText,
int  brcType,
int  brcHriType,
int  brcJustification,
int  brcWidth,
int  brcHeight 
) throws CustomException
inline

Sends barcode data to printer to print and check it with veriprint scanner

Parameters
brcTextBarcode Text
brcTypeBarcode Type
  • BARCODE_TYPE_CODABAR - Indicates to print a CODEBAR Barcode
  • BARCODE_TYPE_UPCA - Indicates to print a UPCA Barcode
  • BARCODE_TYPE_UPCE - Indicates to print a UPCE Barcode
  • BARCODE_TYPE_EAN13 - Indicates to print a EAN13 Barcode
  • BARCODE_TYPE_EAN8 - Indicates to print a EAN8 Barcode
  • BARCODE_TYPE_CODE39 - Indicates to print a CODE39 Barcode
  • BARCODE_TYPE_ITF - Indicates to print a ITF Barcode
  • BARCODE_TYPE_CODE93 - Indicates to print a CODE93 Barcode
  • BARCODE_TYPE_CODE128 - Indicates to print a CODE128 Barcode
  • BARCODE_TYPE_CODE32 - Indicates to print a CODE32 Barcode
brcHriTypeBarcode HRI (Human Readable Information) Type
  • BARCODE_HRI_NONE - Indicates no HRI on the Barcode
  • BARCODE_HRI_TOP - Indicates HRI on TOP of the Barcode
  • BARCODE_HRI_BOTTOM - Indicates HRI on BOTTOM of the Barcode
  • BARCODE_HRI_TOPBOTTOM - Indicates HRI on TOP and BOTTOM of the Barcode
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode Width expressed in dot (referred to the narrowest bar)
brcHeightBarcode Height
Returns
true if the barcode is read correctly else false
Exceptions
CustomException
boolean it.custom.printer.api.android.CustomPrinter.scannerPrintBarcodeAndVerify ( byte[]  brcData,
int  nBytes,
int  brcType,
int  brcHriType,
int  brcJustification,
int  brcWidth,
int  brcHeight 
) throws CustomException
inline

Sends barcode data to printer to print and check it with veriprint scanner

Parameters
brcDataBarcode Data
nBytesBarcode Data Size
brcTypeBarcode Type
  • BARCODE_TYPE_CODABAR - Indicates to print a CODEBAR Barcode
  • BARCODE_TYPE_UPCA - Indicates to print a UPCA Barcode
  • BARCODE_TYPE_UPCE - Indicates to print a UPCE Barcode
  • BARCODE_TYPE_EAN13 - Indicates to print a EAN13 Barcode
  • BARCODE_TYPE_EAN8 - Indicates to print a EAN8 Barcode
  • BARCODE_TYPE_CODE39 - Indicates to print a CODE39 Barcode
  • BARCODE_TYPE_ITF - Indicates to print a ITF Barcode
  • BARCODE_TYPE_CODE93 - Indicates to print a CODE93 Barcode
  • BARCODE_TYPE_CODE128 - Indicates to print a CODE128 Barcode
  • BARCODE_TYPE_CODE32 - Indicates to print a CODE32 Barcode
brcHriTypeBarcode HRI (Human Readable Information) Type
  • BARCODE_HRI_NONE - Indicates no HRI on the Barcode
  • BARCODE_HRI_TOP - Indicates HRI on TOP of the Barcode
  • BARCODE_HRI_BOTTOM - Indicates HRI on BOTTOM of the Barcode
  • BARCODE_HRI_TOPBOTTOM - Indicates HRI on TOP and BOTTOM of the Barcode
brcJustificationBarcode Justification
  • BARCODE_ALIGN_TO_LEFT - Indicates that the Barcode Justification is Left
  • BARCODE_ALIGN_TO_CENTER - Indicates that the Barcode Justification is Center
  • BARCODE_ALIGN_TO_RIGHT - Indicates that the Barcode Justification is Right
brcWidthBarcode Width expressed in dot (referred to the narrowest bar)
brcHeightBarcode Height
Returns
true if the barcode is read correctly else false
Exceptions
CustomException
Remarks
NOTE: If the barcode is read, the printer cut the paper. If the barcode is not correctly read, the printer moves the paper backwards and prints above the barcode the "void.bmp" stored into flash disk.
boolean it.custom.printer.api.android.CustomPrinter.scannerProgramTickets ( byte[]  bBufferRicketsFile,
boolean  bSaveOnlyToRam 
) throws CustomException
inline

Programs the tickets to the scanner

Parameters
bBufferRicketsFilebuffer with the ticket raw file
bSaveOnlyToRamtrue if the file is saved ONLY into the RAM
Returns
true if the file is correct
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerSetEndScanMovement ( int  iAutoMType) throws CustomException
inline

Sets the automatic Movement type at the end of the scan

Parameters
iAutoMTypeAutomatic Mouvement Type
  • SCANNER_AUTOM_HOLD - Hold the paper after the scan.
  • SCANNER_AUTOM_RETRACT - Retract the paper after the scan.
  • SCANNER_AUTOM_EJECT - Eject the paper after the scan.
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerSetSearchType ( int  iSearchTypes,
boolean  bSaveOnlyToRam 
) throws CustomException
inline

Sets the scanner serch types

Parameters
iSearchTypesSearch types bitmask
bSaveOnlyToRamtrue if the value is saved ONLY into the RAM
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerSetThresholds ( int  ithHW,
int  ithSW 
) throws CustomException
inline

Sets the Threshold HW and Threshold SW

Parameters
ithHWThreshold HW (0<= ithHW <=255)
ithSWThreshold SW (0<= ithSW <=255)
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerVoidBarcode ( Bitmap  image) throws CustomException
inline

Automatically go to the barcode found and prints a image with scanner void printer

Parameters
imageImage to Print
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.scannerVoidTicket ( Bitmap  image,
int  iOffsetMM 
) throws CustomException
inline

Prints a image with scanner void printer

Parameters
imageImage to Print
iOffsetMMmm offset to do before print
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.setReadTimeout ( int  msecs) throws CustomException
inline

Sets the Read Timeout. It can be between 50-30000 milliseconds.

Parameters
msecsRead Timeout (milliseconds)
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.setWriteTimeout ( int  msecs) throws CustomException
inline

Sets the Write Timeout. It can be between 50-30000 milliseconds.

Parameters
msecsWrite Timeout (milliseconds)
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.writeData ( int[]  data) throws CustomException
inline

Write Data Buffer to printer.

Parameters
dataData Buffer to Write
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.writeData ( int[]  data,
int  offset,
int  nBytes 
) throws CustomException
inline

Write Data Buffer to printer.

Parameters
dataData Buffer to Write
offsetData Buffer offset
nBytesnumber of Bytes to send to printer
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.writeData ( byte[]  data) throws CustomException
inline

Write Data Buffer to printer.

Parameters
dataData Buffer to Write
Exceptions
CustomException
void it.custom.printer.api.android.CustomPrinter.writeData ( byte[]  data,
int  offset,
int  nBytes 
) throws CustomException
inline

Write Data Buffer to printer.

Parameters
dataData Buffer to Write
offsetData Buffer offset
nBytesnumber of Bytes to send to printer
Exceptions
CustomException

Member Data Documentation

final int it.custom.printer.api.android.CustomPrinter.BARCODE_ALIGN_TO_CENTER = -1
static

Indicates that the Barcode Justification is Center

final int it.custom.printer.api.android.CustomPrinter.BARCODE_ALIGN_TO_LEFT = 0
static

Indicates that the Barcode Justification is Left

final int it.custom.printer.api.android.CustomPrinter.BARCODE_ALIGN_TO_RIGHT = -2
static

Indicates that the Barcode Justification is Right

final int it.custom.printer.api.android.CustomPrinter.BARCODE_HRI_BOTTOM = 2
static

Indicates HRI on BOTTOM of the Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_HRI_NONE = 0
static

Indicates no HRI on the Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_HRI_TOP = 1
static

Indicates HRI on TOP of the Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_HRI_TOPBOTTOM = 3
static

Indicates HRI on TOP and BOTTOM of the Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_AZTEC = -104
static

Indicates to print a AZTEC Barcode 2D

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_CODABAR = -1
static

Indicates to print a CODEBAR Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_CODE128 = -9
static

Indicates to print a CODE128 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_CODE32 = -10
static

Indicates to print a CODE32 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_CODE39 = -6
static

Indicates to print a CODE39 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_CODE93 = -8
static

Indicates to print a CODE93 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_DATAMATRIX = -103
static

Indicates to print a DATAMATRIX Barcode 2D

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_EAN13 = -4
static

Indicates to print a EAN13 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_EAN8 = -5
static

Indicates to print a EAN8 Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_ITF = -7
static

Indicates to print a ITF Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_PDF417 = -102
static

Indicates to print a PDF417 Barcode 2D

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_QRCODE = -101
static

Indicates to print a QRCODE Barcode 2D

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_UPCA = -2
static

Indicates to print a UPCA Barcode

final int it.custom.printer.api.android.CustomPrinter.BARCODE_TYPE_UPCE = -3
static

Indicates to print a UPCE Barcode

final int it.custom.printer.api.android.CustomPrinter.COMMTYPE_BLUETOOTH = 0
static

Indicates that the communication port is a BLUETOOTH

final int it.custom.printer.api.android.CustomPrinter.COMMTYPE_COM = 3
static

Indicates that the communication port is a COM/TTY

final int it.custom.printer.api.android.CustomPrinter.COMMTYPE_ETHERNET = 1
static

Indicates that the communication port is a ETHERNET / WIFI

final int it.custom.printer.api.android.CustomPrinter.COMMTYPE_USB = 2
static

Indicates that the communication port is a USB

final int it.custom.printer.api.android.CustomPrinter.CUT_PARTIAL = 1
static

Indicates to perform a Partial Cut

final int it.custom.printer.api.android.CustomPrinter.CUT_TOTAL = 0
static

Indicates to perform a Total Cut

final int it.custom.printer.api.android.CustomPrinter.EJ_EJECT = 0
static

Indicates to perform a Eject

final int it.custom.printer.api.android.CustomPrinter.EJ_RETRACT = 1
static

Indicates to perform a Retract

final int it.custom.printer.api.android.CustomPrinter.IMAGE_ALIGN_TO_CENTER = -1
static

Indicates that the Picture Justification is Center

final int it.custom.printer.api.android.CustomPrinter.IMAGE_ALIGN_TO_LEFT = 0
static

Indicates that the Picture Justification is Left

final int it.custom.printer.api.android.CustomPrinter.IMAGE_ALIGN_TO_RIGHT = -2
static

Indicates that the Picture Justification is Right

final int it.custom.printer.api.android.CustomPrinter.IMAGE_SCALE_NONE = 0
static

Indicates that the Picture will be No scaling. Excess size will be ignored

final int it.custom.printer.api.android.CustomPrinter.IMAGE_SCALE_TO_FIT = 1
static

Indicates that the Picture will be Scale to fit the paper width

final int it.custom.printer.api.android.CustomPrinter.IMAGE_SCALE_TO_WIDTH = 2
static

Indicates that the Picture will be Scale the image to width given by width parameter

final int it.custom.printer.api.android.CustomPrinter.SCANNER_AUTOM_EJECT = 0x32
static

Indicates that the Scanner will automatically eject the paper after the scan

final int it.custom.printer.api.android.CustomPrinter.SCANNER_AUTOM_HOLD = 0x30
static

Indicates that the Scanner will automatically hold the paper after the scan

final int it.custom.printer.api.android.CustomPrinter.SCANNER_AUTOM_RETRACT = 0x31
static

Indicates that the Scanner will automatically retract the paper after the scan

final int it.custom.printer.api.android.CustomPrinter.SCANNER_EJ_EJECT = 0x32
static

Indicates that the Scanner will perform a eject

final int it.custom.printer.api.android.CustomPrinter.SCANNER_EJ_RETRACT = 0x31
static

Indicates that the Scanner will perform a retract

final int it.custom.printer.api.android.CustomPrinter.SCANNER_FEEDER_DISABLE = 0
static

Indicates that the Scanner Feeder is Disable

final int it.custom.printer.api.android.CustomPrinter.SCANNER_FEEDER_ENABLE = 1
static

Indicates that the Scanner Feeder is Enable

final int it.custom.printer.api.android.CustomPrinter.SCANNER_IMAGE_BW = 2
static

Indicates that the Image will be in Black & White (1bit)

final int it.custom.printer.api.android.CustomPrinter.SCANNER_IMAGE_GRAY_256 = 1
static

Indicates that the Image will be in grayscale with 256 gray levels (8 bits)

final int it.custom.printer.api.android.CustomPrinter.SCANNER_SEARCH_NONE = 0
static

Indicates that the Scanner doesn't search anything

final int it.custom.printer.api.android.CustomPrinter.SCANNER_SEARCH_TYPE_BARCODE = 2
static

Indicates that the Scanner will search the barcode

final int it.custom.printer.api.android.CustomPrinter.SCANNER_SEARCH_TYPE_CARD = 1
static

Indicates that the Scanner will search the card

final int it.custom.printer.api.android.CustomPrinter.SCANNER_SEARCH_TYPE_CARD_AND_BARCODE = 3
static

Indicates that the Scanner will search the card and barcode