bluetooth printer plugin
npm install @alarify-io/bluetooth-printerbluetooth printer plugin
bash
npm publish --registry https://npm.pkg.jetbrains.space/happytech/p/hc/hc-npm/
`Install
`bash
npm install hc-bluetooth-printer
npx cap sync
`API
echo(...)
* status()
* list()
* connect(...)
* connected()
* disconnect()
* setEncoding(...)
* printText(...)
* printTextSizeAlign(...)
* printBase64(...)
* printTitle(...)
* printImageUrl(...)
* printPOSCommand(...)
* printQRCode(...)
* printBarcode(...)
$3
`typescript
echo(options: { value: string; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ------------------------------- |
|
options | { value: string; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
status() => Promise<{ value: boolean; }>
`Returns: Promise<{ value: boolean; }>
--------------------
$3
`typescript
list() => Promise<{ value: { name: string; address: string; type: number; }[]; }>
`Returns: Promise<{ value: { name: string; address: string; type: number; }[]; }>
--------------------
$3
`typescript
connect(options: { name: string; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ------------------------------ |
|
options | { name: string; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
connected() => Promise<{ value: boolean; }>
`Returns: Promise<{ value: boolean; }>
--------------------
$3
`typescript
disconnect() => Promise<{ value: string; }>
`Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
setEncoding(options: { encoding: string; }) => Promise
`| Param | Type |
| ------------- | ---------------------------------- |
|
options | { encoding: string; } |--------------------
$3
`typescript
printText(options: { text: string; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ------------------------------ |
|
options | { text: string; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printTextSizeAlign(options: { text: string; size: number; align: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ----------------------------------------------------------- |
|
options | { text: string; size: number; align: number; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printBase64(options: { imgData: string; align: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ------------------------------------------------ |
|
options | { imgData: string; align: number; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printTitle(options: { text: string; size: number; align: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ----------------------------------------------------------- |
|
options | { text: string; size: number; align: number; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printImageUrl(options: { url: string; align: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | -------------------------------------------- |
|
options | { url: string; align: number; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printPOSCommand(options: { dataHex: string; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | --------------------------------- |
|
options | { dataHex: string; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printQRCode(options: { text: string; align: number; model: number; size: number; eccLevel: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | -------------------------------------------------------------------------------------------- |
|
options | { text: string; align: number; model: number; size: number; eccLevel: number; } |Returns: Promise<{ value: string; }>
--------------------
$3
`typescript
printBarcode(options: { system: number; data: string; align: number; position: number; font: number; height: number; }) => Promise<{ value: string; }>
`| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------------------- |
|
options` | { system: number; data: string; align: number; position: number; font: number; height: number; } |Returns: Promise<{ value: string; }>
--------------------