0.0.1 • Published 4 years ago
capacitor-plugin-sunmidevice v0.0.1
capacitor-plugin-sunmidevice
Capacitor Plugin for Sunmi Devices
Install
npm install capacitor-plugin-sunmidevice
npx cap sync
API
echo(...)
getPrinterSerialNo()
getPrinterModal()
getPrinterVersion()
updatePrinterState()
getServiceVersion()
getPrinterPaper()
getPrinterMode()
initPrinter()
sendRawData(...)
setPrinterStyle(...)
setAlignment(...)
setFontSize(...)
printText(...)
printLine(...)
printTextWithFont(...)
printOriginalText(...)
printColumnsText(...)
printColumnsString(...)
printBitmap(...)
printBitmapCustom(...)
printBarCode(...)
printQRCode(...)
lineWrap(...)
feedPaper()
labelLocate()
labelOutput()
boldOn()
boldOff()
underlineOn()
underlineOff()
- Interfaces
- Enums
echo(...)
echo(options: { value: string; }) => any
Param | Type |
---|---|
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
Param | Type |
---|---|
options | { data: string; } |
Returns: any
setPrinterStyle(...)
setPrinterStyle(options: PrinterStyleOptions) => any
Param | Type |
---|---|
options | PrinterStyleOptions |
Returns: any
setAlignment(...)
setAlignment(options: { alignment: number; }) => any
Param | Type |
---|---|
options | { alignment: number; } |
Returns: any
setFontSize(...)
setFontSize(options: { fontSize: number; }) => any
Param | Type |
---|---|
options | { fontSize: number; } |
Returns: any
printText(...)
printText(options: { text: string; }) => any
Param | Type |
---|---|
options | { text: string; } |
Returns: any
printLine(...)
printLine(options: { text: string; }) => any
Param | Type |
---|---|
options | { text: string; } |
Returns: any
printTextWithFont(...)
printTextWithFont(options: { text: string; fontSize: number; }) => any
Param | Type |
---|---|
options | { text: string; fontSize: number; } |
Returns: any
printOriginalText(...)
printOriginalText(options: { text: string; }) => any
Param | Type |
---|---|
options | { text: string; } |
Returns: any
printColumnsText(...)
printColumnsText(options: { colsTextArr: string[]; colsWidthArr: number[]; colsAlign: number[]; }) => any
Param | Type |
---|---|
options | { colsTextArr: {}; colsWidthArr: {}; colsAlign: {}; } |
Returns: any
printColumnsString(...)
printColumnsString(options: { colsTextArr: string[]; colsWidthArr: number[]; colsAlign: number[]; }) => any
Param | Type |
---|---|
options | { colsTextArr: {}; colsWidthArr: {}; colsAlign: {}; } |
Returns: any
printBitmap(...)
printBitmap(options: { data: string; }) => any
Param | Type |
---|---|
options | { data: string; } |
Returns: any
printBitmapCustom(...)
printBitmapCustom(options: { data: string; type: number; }) => any
Param | Type |
---|---|
options | { data: string; type: number; } |
Returns: any
printBarCode(...)
printBarCode(options: BarCodeOptions) => any
Param | Type |
---|---|
options | BarCodeOptions |
Returns: any
printQRCode(...)
printQRCode(options: { data: string; modulesize: number; errorlevel: number; }) => any
Param | Type |
---|---|
options | { data: string; modulesize: number; errorlevel: number; } |
Returns: any
lineWrap(...)
lineWrap(options: { noOfLine: number; }) => any
Param | Type |
---|---|
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
Prop | Type | Description |
---|---|---|
key | WoyouConsts | Set key |
value | number | Corresponds to the key setting |
BarCodeOptions
Prop | Type | Description |
---|---|---|
data | string | barcode to be printed |
symbology | BarCodeType | barcode type (0-8) |
height | number | barcode height (ranges from 1-255. 162 by default) |
width | number | barcode width (ranges from 2-6. 2 by default) |
textposition | number | text 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
Members | Value |
---|---|
ENABLE | 1 |
DISABLE | 2 |
ENABLE_DOUBLE_WIDTH | 1000 |
ENABLE_DOUBLE_HEIGHT | 1001 |
ENABLE_BOLD | 1002 |
ENABLE_UNDERLINE | 1003 |
ENABLE_ANTI_WHITE | 1004 |
ENABLE_STRIKETHROUGH | 1005 |
ENABLE_ILALIC | 1006 |
ENABLE_INVERT | 1007 |
SET_TEXT_RIGHT_SPACING | 2000 |
SET_RELATIVE_POSITION | 2001 |
SET_ABSOLUATE_POSITION | 2002 |
SET_LINE_SPACING | 2003 |
SET_LEFT_SPACING | 2004 |
SET_STRIKETHROUGH_STYLE | 2005 |
BarCodeType
Members | Value |
---|---|
UPC_A | 0 |
UPC_E | 1 |
JAN13_EAN13 | 2 |
JAN8_EAN8 | 3 |
CODE39 | 4 |
ITF | 5 |
CODABAR | 6 |
CODE93 | 7 |
CODE128 | 8 |
0.0.1
4 years ago