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