0.0.1 • Published 4 years ago

capacitor-plugin-sunmidevice v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

capacitor-plugin-sunmidevice

Capacitor Plugin for Sunmi Devices

Install

npm install capacitor-plugin-sunmidevice
npx cap sync

API

echo(...)

echo(options: { value: string; }) => any
ParamType
options{ value: string; }

Returns: any


getPrinterSerialNo()

getPrinterSerialNo() => any

Returns: any


getPrinterModal()

getPrinterModal() => any

Returns: any


getPrinterVersion()

getPrinterVersion() => any

Returns: any


updatePrinterState()

updatePrinterState() => any

Returns: any


getServiceVersion()

getServiceVersion() => any

Returns: any


getPrinterPaper()

getPrinterPaper() => any

Returns: any


getPrinterMode()

getPrinterMode() => any

Returns: any


initPrinter()

initPrinter() => any

Returns: any


sendRawData(...)

sendRawData(options: { data: string; }) => any
ParamType
options{ data: string; }

Returns: any


setPrinterStyle(...)

setPrinterStyle(options: PrinterStyleOptions) => any
ParamType
optionsPrinterStyleOptions

Returns: any


setAlignment(...)

setAlignment(options: { alignment: number; }) => any
ParamType
options{ alignment: number; }

Returns: any


setFontSize(...)

setFontSize(options: { fontSize: number; }) => any
ParamType
options{ fontSize: number; }

Returns: any


printText(...)

printText(options: { text: string; }) => any
ParamType
options{ text: string; }

Returns: any


printLine(...)

printLine(options: { text: string; }) => any
ParamType
options{ text: string; }

Returns: any


printTextWithFont(...)

printTextWithFont(options: { text: string; fontSize: number; }) => any
ParamType
options{ text: string; fontSize: number; }

Returns: any


printOriginalText(...)

printOriginalText(options: { text: string; }) => any
ParamType
options{ text: string; }

Returns: any


printColumnsText(...)

printColumnsText(options: { colsTextArr: string[]; colsWidthArr: number[]; colsAlign: number[]; }) => any
ParamType
options{ colsTextArr: {}; colsWidthArr: {}; colsAlign: {}; }

Returns: any


printColumnsString(...)

printColumnsString(options: { colsTextArr: string[]; colsWidthArr: number[]; colsAlign: number[]; }) => any
ParamType
options{ colsTextArr: {}; colsWidthArr: {}; colsAlign: {}; }

Returns: any


printBitmap(...)

printBitmap(options: { data: string; }) => any
ParamType
options{ data: string; }

Returns: any


printBitmapCustom(...)

printBitmapCustom(options: { data: string; type: number; }) => any
ParamType
options{ data: string; type: number; }

Returns: any


printBarCode(...)

printBarCode(options: BarCodeOptions) => any
ParamType
optionsBarCodeOptions

Returns: any


printQRCode(...)

printQRCode(options: { data: string; modulesize: number; errorlevel: number; }) => any
ParamType
options{ data: string; modulesize: number; errorlevel: number; }

Returns: any


lineWrap(...)

lineWrap(options: { noOfLine: number; }) => any
ParamType
options{ noOfLine: number; }

Returns: any


feedPaper()

feedPaper() => any

Returns: any


labelLocate()

labelLocate() => any

Returns: any


labelOutput()

labelOutput() => any

Returns: any


boldOn()

boldOn() => any

Returns: any


boldOff()

boldOff() => any

Returns: any


underlineOn()

underlineOn() => any

Returns: any


underlineOff()

underlineOff() => any

Returns: any


Interfaces

PrinterStyleOptions

PropTypeDescription
keyWoyouConstsSet key
valuenumberCorresponds to the key setting

BarCodeOptions

PropTypeDescription
datastringbarcode to be printed
symbologyBarCodeTypebarcode type (0-8)
heightnumberbarcode height (ranges from 1-255. 162 by default)
widthnumberbarcode width (ranges from 2-6. 2 by default)
textpositionnumbertext position (0-3) 0--do not print text, 1--text above the bar code, 2--text below the bar code, 3--print both above and below the bar code

Enums

WoyouConsts

MembersValue
ENABLE1
DISABLE2
ENABLE_DOUBLE_WIDTH1000
ENABLE_DOUBLE_HEIGHT1001
ENABLE_BOLD1002
ENABLE_UNDERLINE1003
ENABLE_ANTI_WHITE1004
ENABLE_STRIKETHROUGH1005
ENABLE_ILALIC1006
ENABLE_INVERT1007
SET_TEXT_RIGHT_SPACING2000
SET_RELATIVE_POSITION2001
SET_ABSOLUATE_POSITION2002
SET_LINE_SPACING2003
SET_LEFT_SPACING2004
SET_STRIKETHROUGH_STYLE2005

BarCodeType

MembersValue
UPC_A0
UPC_E1
JAN13_EAN132
JAN8_EAN83
CODE394
ITF5
CODABAR6
CODE937
CODE1288
0.0.1

4 years ago