SmartPos SDK for Android  1.3.7
com.paydevice.smartpos.sdk.printer.PrinterManager Class Reference

Class of PrinterManager implement. More...

Public Member Functions

 PrinterManager (Printer printer, int paperWidthType)
 
int getPrinterType ()
 Get the printer type. More...
 
void connect () throws SmartPosException
 Connect the printer and initialize. More...
 
void disconnect () throws SmartPosException
 Disconnect the printer(keep power for built-in serialport printer) More...
 
void disconnect (boolean turnOff) throws SmartPosException
 Disconnect and turn off the printer power, valid for built-in serialport printer. More...
 
void checkPaper () throws SmartPosException
 Check paper status. More...
 
void setStringEncoding (String encoding) throws SmartPosException
 Set default string encoding. More...
 
synchronized void sendData (String data) throws SmartPosException
 Send string data(use global encoding by setStringEncoding) More...
 
synchronized void sendData (String data, String encoding) throws SmartPosException
 Send string data by appoint encoding. More...
 
synchronized void sendCmd (byte[] cmd) throws SmartPosException
 Write command to printing buffer. More...
 
void cmdLineFeed () throws SmartPosException
 Print buffer and feeds one line. More...
 
void cmdLineFeed (int n) throws SmartPosException
 Print buffer and feeds n line. ESC2,ESC3 decide the line spacing. More...
 
void cmdJumpTab () throws SmartPosException
 Jump to next tab, position decide by cmdSetTable. More...
 
void cmdUnSetTable () throws SmartPosException
 Unset horizontal table position. More...
 
void cmdSetTable (byte[] offset) throws SmartPosException
 Sets horizontal table position. More...
 
void cmdSetDefaultLineSpacing () throws SmartPosException
 Set the line space to default value(32dots) More...
 
void cmdSetLineSpacing (int dots) throws SmartPosException
 Set the line space to n dots. More...
 
void cmdSetAlignMode (int mode) throws SmartPosException
 Set align mode. More...
 
void cmdSetPrintOffset (int offset) throws SmartPosException
 Set print offset(Only valid in current line) More...
 
void cmdSetPrintMode (int mode) throws SmartPosException
 Sets print mode for all characters. More...
 
void cmdSetUnderlineHeight (int n) throws SmartPosException
 Set the underline height. More...
 
void cmdSetFontScaleSize (int scaleWidth, int scaleHeight) throws SmartPosException
 Scale the font's width and height. More...
 
void cmdSetBarCodeStringPosition (int mode) throws SmartPosException
 Set the position of the bar code string. More...
 
void cmdSetBarCodeStringSize (int size) throws SmartPosException
 Sets the font size of the bar code string. More...
 
void cmdSetBarCodeHeight (int n) throws SmartPosException
 Set the bar code height. More...
 
void cmdSetBarCodeWidth (int n) throws SmartPosException
 Set the bar code width. More...
 
void cmdSetBarCodeLeftSpacing (int n) throws SmartPosException
 Sets the left blank dots for bar code. More...
 
void cmdBarCodePrint (int type, String string) throws SmartPosException
 Print bar code. More...
 
void cmdBarCodePrint (int type, byte[] stringBytes) throws SmartPosException
 Print bar code. More...
 
void cmdBitmapPrint (Bitmap bitmap, int left, int top) throws SmartPosException
 Print bitmap(Only valid when the printer buffer is empty) More...
 
void cmdBitmapPrintEx (Bitmap bitmap, int left, int top) throws SmartPosException
 Print bitmap(Only valid when the printer buffer is empty) More...
 
void cmdSetHeatingParam (int dots, int time, int interval) throws SmartPosException
 Adjust hearting param, some printer support this command. More...
 
void cmdSetPrintDensity (int density, int delay) throws SmartPosException
 Set the print density, some printer support this command. More...
 
void cmdSetCharacterSet (int set) throws SmartPosException
 Set the international character set. More...
 
void cmdSetPrinterLanguage (int code) throws SmartPosException
 Set the character code page. More...
 
void cmdQrCodePrint (int version, int ecc, String data) throws SmartPosException
 Print QR code. More...
 
void cmdPrintMultipleLines (int lineCount, int[] lineStartPos, int[] lineEndPos) throws SmartPosException
 print line segments More...
 
void cmdSaveBitmapToNVRAM (Bitmap[] bmpArray) throws SmartPosException
 Save bitmaps into NVRAM(control board's NVRAM, bitmaps always hold even after power off). More...
 
void cmdDeleteBitmapFromNVRAM () throws SmartPosException
 Delete all bitmaps form NVRAM. More...
 
void cmdPrintBitmapFromNVRAM (int index, int zoom) throws SmartPosException
 Print bitmap form NVRAM by index. More...
 
void cmdPrintTest () throws SmartPosException
 Print a test page, some printer support this command. More...
 
void cmdCutPaper (int mode) throws SmartPosException
 Select the cut mode to cut paper(Only valid for usb printer) More...
 
void fwUpdate (AssetManager am, String name) throws SmartPosException
 update firmwire(Only valid for serialport printer) More...
 
int cmdGetPrinterModel ()
 Get printer model(Only valid for serialport printer) More...
 
int getDotsPerLine ()
 Get the dots per line. More...
 
boolean isBuiltInSlow ()
 If built-in printer is slow version(Only valid for serialport printer) More...
 

Static Public Attributes

static final int PRINTER_ERR_OPEN = 1
 
static final int PRINTER_ERR_CLOSE = 2
 
static final int PRINTER_ERR_READ = 3
 
static final int PRINTER_ERR_WRITE = 4
 
static final int PRINTER_ERR_PARAM = 5
 
static final int PRINTER_ERR_NO_PAPER = 6
 
static final int PRINTER_ERR_UPDATE = 7
 
static final int PRINTER_TYPE_USB = 0x1
 
static final int PRINTER_TYPE_SERIAL = 0x2
 
static final int PRINTER_TYPE_NETWORK = 0x3
 
static final int PRINTER_TYPE_BLUETOOTH = 0x4
 
static final int PRINTER_MODEL_UNKNOWN = 0
 
static final int PRINTER_MODEL_PRN2103 = 1
 
static final int FULL_CUT = 0
 
static final int HALF_CUT = 1
 
static final int ALIGN_LEFT = 0
 
static final int ALIGN_MIDDLE = 1
 
static final int ALIGN_RIGHT = 2
 
static final int FONT_DEFAULT = 0
 
static final int FONT_SMALL = 1<<0
 
static final int FONT_INVERSE = 1<<1
 
static final int FONT_UPSIDE_DOWN = 1<<2
 
static final int FONT_EMPHASIZED = 1<<3
 
static final int FONT_DOUBLE_HEIGHT = 1<<4
 
static final int FONT_DOUBLE_WIDTH = 1<<5
 
static final int FONT_ROTATE = 1<<6
 
static final int FONT_UNDERLINE = 1<<7
 
static final int UNDERLINE_ZERO = 0
 
static final int UNDERLINE_HIGH_1 = 1
 
static final int UNDERLINE_HIGH_2 = 2
 
static final int CODEBAR_STRING_MODE_NONE = 0
 
static final int CODEBAR_STRING_MODE_ABOVE = 1
 
static final int CODEBAR_STRING_MODE_BELOW = 2
 
static final int CODEBAR_STRING_MODE_BOTH = 3
 
static final int CODEBAR_STRING_FONT_A = 0
 
static final int CODEBAR_STRING_FONT_B = 1
 
static final int UPC_A = 65
 
static final int UPC_E = 66
 
static final int EAN13 = 67
 
static final int EAN8 = 68
 
static final int CODE39 = 69
 
static final int I25 = 70
 
static final int CODABAR = 71
 
static final int CODE93 = 72
 
static final int CODE128 = 73
 
static final int CODE11 = 74
 
static final int MSI = 75
 
static final int QR_ECC_LEVEL_L = 1
 
static final int QR_ECC_LEVEL_M = 2
 
static final int QR_ECC_LEVEL_Q = 3
 
static final int QR_ECC_LEVEL_H = 4
 
static final int CHAR_SET_USA = 0
 
static final int CHAR_SET_FRANCE = 1
 
static final int CHAR_SET_GERMANY = 2
 
static final int CHAR_SET_ENGLAND = 3
 
static final int CHAR_SET_DENMARK_I = 4
 
static final int CHAR_SET_SWEDEN = 5
 
static final int CHAR_SET_ITALY = 6
 
static final int CHAR_SET_SPAIN_I = 7
 
static final int CHAR_SET_JAPAN = 8
 
static final int CHAR_SET_NORWAY = 9
 
static final int CHAR_SET_DENMARK_II = 10
 
static final int CHAR_SET_SPAIN_II = 11
 
static final int CHAR_SET_LATIN_AMERICA = 12
 
static final int CHAR_SET_KOREA = 13
 
static final int CHAR_SET_CROATIA = 14
 
static final int CHAR_SET_CHINA = 15
 
static final int CODE_PAGE_CP437 = 0
 
static final int CODE_PAGE_KATAKANA = 1
 
static final int CODE_PAGE_CP850 = 2
 
static final int CODE_PAGE_CP860 = 3
 
static final int CODE_PAGE_CP863 = 4
 
static final int CODE_PAGE_CP865 = 5
 
static final int CODE_PAGE_CP1251 = 6
 
static final int CODE_PAGE_CP866 = 7
 
static final int CODE_PAGE_MIK = 8
 
static final int CODE_PAGE_CP755 = 9
 
static final int CODE_PAGE_IRAN = 10
 
static final int CODE_PAGE_CP862 = 15
 
static final int CODE_PAGE_CP1252 = 16
 
static final int CODE_PAGE_CP1253 = 17
 
static final int CODE_PAGE_CP852 = 18
 
static final int CODE_PAGE_CP858 = 19
 
static final int CODE_PAGE_IRAN2 = 20
 
static final int CODE_PAGE_LATVIAN = 21
 
static final int CODE_PAGE_CP864 = 22
 
static final int CODE_PAGE_ISO_8859_1 = 23
 
static final int CODE_PAGE_CP737 = 24
 
static final int CODE_PAGE_CP1257 = 25
 
static final int CODE_PAGE_THAI = 26
 
static final int CODE_PAGE_CP720 = 27
 
static final int CODE_PAGE_CP855 = 28
 
static final int CODE_PAGE_CP857 = 29
 
static final int CODE_PAGE_CP1250 = 30
 
static final int CODE_PAGE_CP775 = 31
 
static final int CODE_PAGE_CP1254 = 32
 
static final int CODE_PAGE_CP1255 = 33
 
static final int CODE_PAGE_CP1256 = 34
 
static final int CODE_PAGE_CP1258 = 35
 
static final int CODE_PAGE_ISO_8859_2 = 36
 
static final int CODE_PAGE_ISO_8859_3 = 37
 
static final int CODE_PAGE_ISO_8859_4 = 38
 
static final int CODE_PAGE_ISO_8859_5 = 39
 
static final int CODE_PAGE_ISO_8859_6 = 40
 
static final int CODE_PAGE_ISO_8859_7 = 41
 
static final int CODE_PAGE_ISO_8859_8 = 42
 
static final int CODE_PAGE_ISO_8859_9 = 43
 
static final int CODE_PAGE_ISO_8859_15 = 44
 
static final int CODE_PAGE_THAI2 = 45
 
static final int CODE_PAGE_CP856 = 46
 
static final int CODE_PAGE_CP874 = 47
 
static final int CODE_PAGE_SHIFT_JIS = 96
 
static final int CODE_PAGE_EUC_KR = 97
 
static final int CODE_PAGE_BIG5 = 98
 
static final int CODE_PAGE_GB18030 = 99
 
static final int BITMAP_ZOOM_NONE = 0
 
static final int BITMAP_ZOOM_WIDTH = 1
 
static final int BITMAP_ZOOM_HEIGHT = 2
 
static final int BITMAP_ZOOM_BOTH = 3
 
static final int TYPE_PAPER_WIDTH_58MM = 0
 
static final int TYPE_PAPER_WIDTH_80MM = 1
 

Detailed Description

Class of PrinterManager implement.

Member Function Documentation

◆ checkPaper()

void com.paydevice.smartpos.sdk.printer.PrinterManager.checkPaper ( ) throws SmartPosException

Check paper status.

Returns

◆ cmdBarCodePrint() [1/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdBarCodePrint ( int  type,
byte[]  stringBytes 
) throws SmartPosException

Print bar code.

Parameters
typebar code encoding type
stringBytesbar code string bytes
Returns

◆ cmdBarCodePrint() [2/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdBarCodePrint ( int  type,
String  string 
) throws SmartPosException

Print bar code.

Parameters
typebar code encoding type
stringbar code string
Returns

◆ cmdBitmapPrint()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdBitmapPrint ( Bitmap  bitmap,
int  left,
int  top 
) throws SmartPosException

Print bitmap(Only valid when the printer buffer is empty)

Parameters
bitmapandroid bitmap
xleft blank dots
ytop blank dots
Returns

◆ cmdBitmapPrintEx()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdBitmapPrintEx ( Bitmap  bitmap,
int  left,
int  top 
) throws SmartPosException

Print bitmap(Only valid when the printer buffer is empty)

Split the bitmap into multiple parts(height 24 dots) and print them one by one)
bitmap height must be an integer multiple of 8.
Parameters
bitmapandroid bitmap
leftleft blank dots
toptop blank dots
Returns

◆ cmdCutPaper()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdCutPaper ( int  mode) throws SmartPosException

Select the cut mode to cut paper(Only valid for usb printer)

Parameters
mode
Returns

◆ cmdDeleteBitmapFromNVRAM()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdDeleteBitmapFromNVRAM ( ) throws SmartPosException

Delete all bitmaps form NVRAM.

Returns

◆ cmdGetPrinterModel()

int com.paydevice.smartpos.sdk.printer.PrinterManager.cmdGetPrinterModel ( )

Get printer model(Only valid for serialport printer)

Returns
PRINTER_MODEL_XXX

◆ cmdJumpTab()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdJumpTab ( ) throws SmartPosException

Jump to next tab, position decide by cmdSetTable.

Returns

◆ cmdLineFeed() [1/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdLineFeed ( ) throws SmartPosException

Print buffer and feeds one line.

Returns

◆ cmdLineFeed() [2/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdLineFeed ( int  n) throws SmartPosException

Print buffer and feeds n line. ESC2,ESC3 decide the line spacing.

Parameters
n0-255
Returns

◆ cmdPrintBitmapFromNVRAM()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdPrintBitmapFromNVRAM ( int  index,
int  zoom 
) throws SmartPosException

Print bitmap form NVRAM by index.

Parameters
index1~255
zoomzoom print
0: original size
1: double width
2: double height
3: double width and double height
Returns

◆ cmdPrintMultipleLines()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdPrintMultipleLines ( int  lineCount,
int[]  lineStartPos,
int[]  lineEndPos 
) throws SmartPosException

print line segments

line segments can make lines or curves
you can used this function to print horizontal line or vertical line and even curve
Parameters
lineCountcount of the line segments
lineStartPosstart position of the line segments array 0-383
lineEndPosend position of the line segments array 0-383
Returns

◆ cmdPrintTest()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdPrintTest ( ) throws SmartPosException

Print a test page, some printer support this command.

Returns

◆ cmdQrCodePrint()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdQrCodePrint ( int  version,
int  ecc,
String  data 
) throws SmartPosException

Print QR code.

Parameters
versionQR version 0~16(n dots x n dots square)
eccQR correction level 1~4
dataQR string data
Returns

◆ cmdSaveBitmapToNVRAM()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSaveBitmapToNVRAM ( Bitmap[]  bmpArray) throws SmartPosException

Save bitmaps into NVRAM(control board's NVRAM, bitmaps always hold even after power off).

Total size of NVRAM is 64KB.Bitmap width and height must be an integer multiple of 8.
Warning: You should not write NVRAM often, it maybe cause NVRAM broken.
Recommended less than 10 times a day.
You should save bitmaps only once and then just print it every times.

Note: Usually, NVRAM used to save large bitmaps(or large area black area) which cannot print by cmdBitmapPrint() or cmdBitmapPrintEx().
This function will cause printer restore all parameter to default and also erase all bitmaps that saved in NVRAM.
Parameters
bmpArraybitmap array
Returns

◆ cmdSetAlignMode()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetAlignMode ( int  mode) throws SmartPosException

Set align mode.

Parameters
mode0:left 1:middle 2:right
Returns

◆ cmdSetBarCodeHeight()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetBarCodeHeight ( int  n) throws SmartPosException

Set the bar code height.

Parameters
n1-255 default is 50
Returns

◆ cmdSetBarCodeLeftSpacing()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetBarCodeLeftSpacing ( int  n) throws SmartPosException

Sets the left blank dots for bar code.

Parameters
n0-255
Returns

◆ cmdSetBarCodeStringPosition()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetBarCodeStringPosition ( int  mode) throws SmartPosException

Set the position of the bar code string.

Parameters
mode
          0: not printed
           1: above bar code
           2: below bar code
           3: botha below and above bar code
Returns

◆ cmdSetBarCodeStringSize()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetBarCodeStringSize ( int  size) throws SmartPosException

Sets the font size of the bar code string.

Parameters
size0 (12x24), 1 (9x17)
Returns

◆ cmdSetBarCodeWidth()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetBarCodeWidth ( int  n) throws SmartPosException

Set the bar code width.

Parameters
n2-6 default is 2
Returns

◆ cmdSetCharacterSet()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetCharacterSet ( int  set) throws SmartPosException

Set the international character set.

Parameters
set
Returns

◆ cmdSetDefaultLineSpacing()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetDefaultLineSpacing ( ) throws SmartPosException

Set the line space to default value(32dots)

Returns

◆ cmdSetFontScaleSize()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetFontScaleSize ( int  scaleWidth,
int  scaleHeight 
) throws SmartPosException

Scale the font's width and height.

But when the character is rotated 90° clockwise, the width and height are reversed
Parameters
scaleWidthwidth multiple 0~7 (For usb printer 0~1)
scaleHeightheight multiple 0~7 (For usb printer 0~1)
Returns

◆ cmdSetHeatingParam()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetHeatingParam ( int  dots,
int  time,
int  interval 
) throws SmartPosException

Adjust hearting param, some printer support this command.

Set max heating dots, heating time, heating interval
The more max heting dots, the more peak current will cost
when printing, the faster printing speed. The max heating dots is 8*(n1+1)
The more heating time, the more density , but the slower printing
speed. If heating time is too short, blank page may occur.
The more heating interval, the more clear, but the slower printingspeed.
Parameters
dots0-255 Max printing dots,Unit(8dots),Default:7(64 dots)
timeHeating time,Unit(10us),Default:80(800us)
intervalHeating interval,Unit(10us),Default:2(20us)
Returns

◆ cmdSetLineSpacing()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetLineSpacing ( int  dots) throws SmartPosException

Set the line space to n dots.

Parameters
dots0-255
Returns

◆ cmdSetPrintDensity()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetPrintDensity ( int  density,
int  delay 
) throws SmartPosException

Set the print density, some printer support this command.

Parameters
density0-31
delay0-7
Returns

◆ cmdSetPrinterLanguage()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetPrinterLanguage ( int  code) throws SmartPosException

Set the character code page.

Parameters
code
Returns

◆ cmdSetPrintMode()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetPrintMode ( int  mode) throws SmartPosException

Sets print mode for all characters.

Note: the underline no effect if set rotated 90° clockwise or inverse
Parameters
mode
bit0: 0 default font(12x24), 1 small font(9x17)
bit1: inverse
bit2: upside down
bit3: emphasized
bit4: double height
bit5: double width
bit6: rotated 90° clockwise
bit7: underline
Returns

◆ cmdSetPrintOffset()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetPrintOffset ( int  offset) throws SmartPosException

Set print offset(Only valid in current line)

Parameters
offsetx dots offset
Returns

◆ cmdSetTable()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetTable ( byte[]  offset) throws SmartPosException

Sets horizontal table position.

Parameters
offsetoffset position array,array length 1-16. unit is 9dots for small font or 12dots for normal font.
eg: 58mm printer(32*12=384dots), print table as follow:
  item1  item2     item3
--------------------------------
  |      |         |
item1 offset is 2 character(2x12 dots)
item2 offset is 9 character(9*12 dots)
item3 offset is 19 character(19*12 dots)
code:
cmdSetTable(new byte[] {2, 9, 19});
cmdJumpTab();
sendData("item1");
cmdJumpTab();
sendData("item2");
cmdJumpTab();
sendData("item3");
cmdUnSetTable();
Returns

◆ cmdSetUnderlineHeight()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdSetUnderlineHeight ( int  n) throws SmartPosException

Set the underline height.

Parameters
n0:no underline 1: height 1 dots 2: height 2 dots
Returns

◆ cmdUnSetTable()

void com.paydevice.smartpos.sdk.printer.PrinterManager.cmdUnSetTable ( ) throws SmartPosException

Unset horizontal table position.

Returns

◆ connect()

void com.paydevice.smartpos.sdk.printer.PrinterManager.connect ( ) throws SmartPosException

Connect the printer and initialize.

Returns

◆ disconnect() [1/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.disconnect ( ) throws SmartPosException

Disconnect the printer(keep power for built-in serialport printer)

Returns

◆ disconnect() [2/2]

void com.paydevice.smartpos.sdk.printer.PrinterManager.disconnect ( boolean  turnOff) throws SmartPosException

Disconnect and turn off the printer power, valid for built-in serialport printer.

Parameters
turnOffIf true, the printer will be powered off with a delay of a few seconds after printing is complete
Returns

◆ fwUpdate()

void com.paydevice.smartpos.sdk.printer.PrinterManager.fwUpdate ( AssetManager  am,
String  name 
) throws SmartPosException

update firmwire(Only valid for serialport printer)

Parameters
am
name
Returns

◆ getDotsPerLine()

int com.paydevice.smartpos.sdk.printer.PrinterManager.getDotsPerLine ( )

Get the dots per line.

Returns
dots count

◆ getPrinterType()

int com.paydevice.smartpos.sdk.printer.PrinterManager.getPrinterType ( )

Get the printer type.

Returns
printer type

◆ isBuiltInSlow()

boolean com.paydevice.smartpos.sdk.printer.PrinterManager.isBuiltInSlow ( )

If built-in printer is slow version(Only valid for serialport printer)

Returns

◆ sendCmd()

synchronized void com.paydevice.smartpos.sdk.printer.PrinterManager.sendCmd ( byte[]  cmd) throws SmartPosException

Write command to printing buffer.

Parameters
cmdcommand byte array
Returns

◆ sendData() [1/2]

synchronized void com.paydevice.smartpos.sdk.printer.PrinterManager.sendData ( String  data) throws SmartPosException

Send string data(use global encoding by setStringEncoding)

Parameters
datastring data you want print
Returns

◆ sendData() [2/2]

synchronized void com.paydevice.smartpos.sdk.printer.PrinterManager.sendData ( String  data,
String  encoding 
) throws SmartPosException

Send string data by appoint encoding.

Parameters
datastring data you want print
encodingsuch as CP437,ISO-8859-1
Returns

◆ setStringEncoding()

void com.paydevice.smartpos.sdk.printer.PrinterManager.setStringEncoding ( String  encoding) throws SmartPosException

Set default string encoding.

Parameters
encoding
Returns

The documentation for this class was generated from the following file: