|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.citizen.jpos.printer.ESCPOSPrinter
public class ESCPOSPrinter
ESCPOSPrinter
Constructor Summary | |
---|---|
ESCPOSPrinter()
|
|
ESCPOSPrinter(DeviceConnection connection)
|
|
ESCPOSPrinter(java.lang.String charset)
Single Connection Constructor. |
|
ESCPOSPrinter(java.lang.String charset,
DeviceConnection connection)
Multi Connection Constructor. |
Method Summary | |
---|---|
int |
asbOff()
|
int |
asbOn()
|
void |
clearPageModeData()
|
void |
cutPaper()
|
int |
drawerSts()
|
boolean |
isASBMode()
|
void |
lineFeed(int lfCount)
2.8. |
void |
openDrawer(int pinNum,
int onTime,
int offTime)
|
void |
printBarCode(java.lang.String data,
int symbology,
int height,
int width,
int alignment,
int textPosition)
|
int |
printBitmap(android.graphics.Bitmap bitmap,
int alignment,
int size)
2.6. |
int |
printBitmap(java.lang.String bitmapName,
int alignment)
2.6. |
int |
printBitmap(java.lang.String bitmapName,
int alignment,
int size)
|
int |
printerCheck()
|
int |
printerSts()
|
void |
printNormal(java.lang.String data)
2.3. |
void |
printNVBitmap(int nvImageNumber)
2.11. |
void |
printNVBitmap(int nvImageNumber,
int size)
|
void |
printPageModeData()
|
void |
printPDF417(java.lang.String pdfData,
int dataLength,
int numberOfColumns,
int cellWidth,
int alignment)
2.13. |
void |
printQRCode(java.lang.String data,
int dataLength,
int moduleSize,
int ecLevel,
int alignment)
2.14. |
void |
printString(java.lang.String data)
2.4. |
void |
printText(java.lang.String data,
int alignment,
int attribute,
int textSize)
2.5. |
int |
receiveByte(byte[] dataBuffer)
For OEM MSR °ú µ¿½Ã»ç¿ëÇÏ¸é ¾ÈµÊ |
void |
sendByte(byte[] dataBuffer)
For OEM |
void |
setAbsoluteHorizontal(int absolutePosition)
|
void |
setAbsoluteVertical(int absolutePosition)
|
void |
setCharSet(java.lang.String charSet)
SetCharSet. |
void |
setDPI(int dpi)
|
void |
setPageMode(boolean pagemode)
|
void |
setPrintDirection(int direction)
|
void |
setPrintingArea(int pageHeight)
Deprecated. |
void |
setPrintingArea(int pageWidth,
int pageHeight)
|
void |
setRelativeHorizontal(int relativePosition)
|
void |
setRelativeVertical(int relativePosition)
|
int |
status()
2.10. status (Mobile Printer Only) |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ESCPOSPrinter()
public ESCPOSPrinter(java.lang.String charset)
charset
- "ISO-8859-1" (Default) "EUC-KR"
public ESCPOSPrinter(DeviceConnection connection)
public ESCPOSPrinter(java.lang.String charset, DeviceConnection connection)
charset
- "ISO-8859-1" (Default) "EUC-KR"
connection
- Method Detail |
---|
public void setCharSet(java.lang.String charSet)
charSet
- public void printNormal(java.lang.String data) throws java.io.UnsupportedEncodingException
data
- - Unicode string. It is same as PrintNormal function in OLE POS Command.
java.io.UnsupportedEncodingException
public void printString(java.lang.String data) throws java.io.UnsupportedEncodingException
data
- - Unicode string. It sets Unicode String to print.
java.io.UnsupportedEncodingException
public void sendByte(byte[] dataBuffer)
public int receiveByte(byte[] dataBuffer) throws java.io.IOException, java.lang.InterruptedException
java.lang.InterruptedException
java.io.IOException
public void printText(java.lang.String data, int alignment, int attribute, int textSize) throws java.io.UnsupportedEncodingException
data
- - Unicode string. It sets Unicode text to print.alignment
- - This value is alignment. It sets text alignment.
CMP_ALIGNMENT_LEFT Left alignment CMP_ALIGNMENT_CENTER Center alignment CMP_ALIGNMENT_RIGHT Right alignment
attribute
- - This value is text attributes. It sets text attributes to print.
CMP_FNT_DEFAULT FontA, Set up as a standard CMP_FNT_FONTB Set up as FontB CMP_FNT_BOLD Set up as Bold attribute CMP_FNT_UNDERLINE Set up as Underline attribute
textSize
- - This value is text size. It sets text size to print.
CMP_TXT_1WIDTH Set up width ratio as x1 CMP_TXT_2WIDTH Set up width ratio as x2 CMP_TXT_3WIDTH Set up width ratio as x3 CMP_TXT_4WIDTH Set up width ratio as x4 CMP_TXT_5WIDTH Set up width ratio as x5 CMP_TXT_6WIDTH Set up width ratio as x6 CMP_TXT_7WIDTH Set up width ratio as x7 CMP_TXT_8WIDTH Set up width ratio as x8 CMP_TXT_1HEIGHT Set up height ratio as x1 CMP_TXT_2HEIGHT Set up height ratio as x2 CMP_TXT_3HEIGHT Set up height ratio as x3 CMP_TXT_4HEIGHT Set up height ratio as x4 CMP_TXT_5HEIGHT Set up height ratio as x5 CMP_TXT_6HEIGHT Set up height ratio as x6 CMP_TXT_7HEIGHT Set up height ratio as x7 CMP_TXT_8HEIGHT Set up height ratio as x8
java.io.UnsupportedEncodingException
public int printBitmap(java.lang.String bitmapName, int alignment) throws java.io.IOException
bitmapName
- - Unicode string. This value is the bitmap file namealignment
- - This value is alignment. It sets image alignment.
CMP_ALIGNMENT_LEFT Left alignment CMP_ALIGNMENT_CENTER Center alignment CMP_ALIGNMENT_RIGHT Right alignment
java.io.IOException
public int printBitmap(java.lang.String bitmapName, int alignment, int size) throws java.io.IOException
java.io.IOException
public int printBitmap(android.graphics.Bitmap bitmap, int alignment, int size) throws java.io.IOException
bitmap
- alignment
-
java.io.IOException
public void printBarCode(java.lang.String data, int symbology, int height, int width, int alignment, int textPosition) throws java.io.UnsupportedEncodingException
width
- - This values barcode width in Dot Units. It sets total barcode width to print.
CMP_BCS_3OF5 Print 3 out of 5(KorMail) BarCode
CMP_BCS_PDF417 Print PDF417 BarCode
CMP_BCS_MAXICODE Print MAXICODE BarCode
CMP_BCS_QRCODE Print QrCode BarCode
CMP_BCS_DATAMATRIX Print DataMatrix BarCode
/
/**
2.7. PrintBarCodedata
- - Unicode string. It sets the barcode data to print.symbology
- - This value is barcode symbol type. It sets barcode type to print.
CMP_BCS_UPCA Print UPC A BarCode CMP_BCS_UPCE Print UPC E BarCode CMP_BCS_EAN8 Print EAN-8 BarCode CMP_BCS_EAN13 Print EAN-13 BarCode CMP_BCS_JAN8 Print JAN-8 BarCode CMP_BCS_JAN13 Print JAN-13 BarCode CMP_BCS_ITF Print Interleaved 2 of 5 CMP_BCS_Codabar Print Codabar BarCode CMP_BCS_Code39 Print Code 3 of 9 BarCode CMP_BCS_Code93 Print Code 93 BarCode CMP_BCS_Code128 Print Code 128 BarCode
height
- - This value is barcode height in Dot Units. It sets barcode height to print.width
- - This values fixed barcode width. (2 <= width <= 6)alignment
- - This value is alignment. It sets barcode alignment.
CMP_ALIGNMENT_LEFT Left alignment CMP_ALIGNMENT_CENTER Center alignment CMP_ALIGNMENT_RIGHT Right alignment
textPosition
- - This value is printing position of barcode HRI letters(barcode data).
CMP_HRI_TEXT_NONE Do not print barcode data CMP_HRI_TEXT_ABOVE Print barcode data above the barcode CMP_HRI_TEXT_BELOW Print barcode data below the barcode
java.io.UnsupportedEncodingException
public void lineFeed(int lfCount)
lfCount
- - This value is the number of lines for line feeding. It sets line feeding counter.public int printerCheck()
public int status()
CMP_PAPER_EMPTY : Printer Status is no paper.
CMP_COVER_OPEN : Printer Cover is open.
CMP_BATTERY_LOW : Printer battery capacity is low.
CMP_STS_MSR_READ : Currently MSR in read mode, printing is impossible.
public void printNVBitmap(int nvImageNumber)
nvImageNumber
- - It sets the Number image stored in Flash Memory to print.public void printNVBitmap(int nvImageNumber, int size)
public void printPDF417(java.lang.String pdfData, int dataLength, int numberOfColumns, int cellWidth, int alignment) throws java.io.UnsupportedEncodingException
pdfData
- - It sets the data for PDF417 printing.dataLength
- - It sets the size of data to print PDF417.numberOfColumns
- - It sets the size of Column to print PDF417. (1 ~ 20)cellWidth
- - It sets the size of Cell to print PDF417.alignment
- - It sets the value for PDF417 alignment
CMP_ALIGNMENT_LEFT Left alignment CMP_ALIGNMENT_CENTER Center alignment CMP_ALIGNMENT_RIGHT Right alignment
java.io.UnsupportedEncodingException
public void printQRCode(java.lang.String data, int dataLength, int moduleSize, int ecLevel, int alignment) throws java.io.UnsupportedEncodingException
data
- - It sets the data for QRCode printing.dataLength
- - It sets the size of data to print QRCode.moduleSize
- - It sets the size of module to print QRCode. (1 ~ 20)ecLevel
- - It sets the Error Correction Level to print QRCode. (0 ~ 3 [Default = 0])
CMP_QRCODE_EC_LEVEL_L Error Correction Level L(7%) CMP_QRCODE_EC_LEVEL_M Error Correction Level M(15%) CMP_QRCODE_EC_LEVEL_Q Error Correction Level Q(25%) CMP_QRCODE_EC_LEVEL_H Error Correction Level H(30%)
alignment
- - It sets the value for QRCode alignment
CMP_ALIGNMENT_LEFT Left alignment CMP_ALIGNMENT_CENTER Center alignment CMP_ALIGNMENT_RIGHT Right alignment
java.io.UnsupportedEncodingException
public boolean isASBMode()
public int asbOn()
public int asbOff()
public int printerSts() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public int drawerSts() throws java.io.IOException, java.lang.InterruptedException
java.io.IOException
java.lang.InterruptedException
public void openDrawer(int pinNum, int onTime, int offTime)
public void cutPaper()
public void printPageModeData()
public void clearPageModeData()
public void setPageMode(boolean pagemode)
public void setPrintDirection(int direction)
public void setDPI(int dpi)
public void setPrintingArea(int pageWidth, int pageHeight)
public void setPrintingArea(int pageHeight)
public void setAbsoluteHorizontal(int absolutePosition)
public void setRelativeHorizontal(int relativePosition)
public void setAbsoluteVertical(int absolutePosition)
public void setRelativeVertical(int relativePosition)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |