Capacitor Plugin to use Sewoo label printers (TxD)
npm install txd-sewoo-printer-capacitorCapacitor Plugin to use printers (TxD)
``bash`
npm install txd-printer-capacitor
npx cap sync
* connect(...)
* disconnect()
* isConnected()
* print(...)
* onConnectionChange(...)
* getStatus()
`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`
isConnected() => Promise<{ connected: boolean; }>
Returns: Promise<{ connected: 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 |
--------------------
`typescript``
getStatus() => Promise<{ printerStatus: string; }>
Returns: Promise<{ printerStatus: string; }>
--------------------