Capacitor Plugin to use printers (TxD)
npm install txd-printer-capacitorCapacitor Plugin to use printers (TxD)
``bash`
npm install txd-printer-capacitor
npx cap sync
* connect(...)
* disconnect()
* print(...)
* onConnectionChange(...)
`typescript`
connect(options: { macAddress: string; initialCmd: string; }) => Promise<{ completed: boolean; }>
| Param | Type |
| ------------- | -------------------------------------------------------- |
| options | { macAddress: string; initialCmd: string; } |
Returns: Promise<{ completed: boolean; }>
--------------------
`typescript`
disconnect() => Promise<{ completed: boolean; }>
Returns: Promise<{ completed: boolean; }>
--------------------
`typescript`
print(options: { content: string; }) => Promise<{ completed: boolean; }>
| Param | Type |
| ------------- | --------------------------------- |
| options | { content: string; } |
Returns: Promise<{ completed: boolean; }>
--------------------
`typescript`
onConnectionChange(callback: () => void) => void
| Param | Type |
| -------------- | -------------------------- |
| callback` | () => void |
--------------------