Zebra printer capacitor plugin library with ZSDK API
npm install @dolosplus/zebra-capacitorZebra printer capacitor plugin library for iOS. Ionic Capacitor v3 wrapper with ZSDK_API. Support base64 PDF and regular Text printing.
Only tested with ZQ520 and ZQ521. Should work for all Zebra Bluetooth printers. Android is not yet supported at the moment unless someone wants to contribute to this repo. Contact me at DOLOS+
``bash`
npm install @dolosplus/zebra-capacitor
npx cap sync
* connectPrinter(...)
* printText(...)
* printPDF(...)
* addListener('printerStatusChange', ...)
* Interfaces
* Type Aliases
`typescript`
connectPrinter(options: { config: string; }) => Promise
| Param | Type |
| ------------- | -------------------------------- |
| options | { config: string; } |
Returns: Promise<any>
--------------------
`typescript`
printText(options: { text: string; }) => Promise
| Param | Type |
| ------------- | ------------------------------ |
| options | { text: string; } |
Returns: Promise<any>
--------------------
`typescript`
printPDF(options: { base64: string; size?: { x: number; y: number; width: number; height: number; }; }) => Promise
| Param | Type |
| ------------- | ------------------------------------------------------------------------------------------------- |
| options | { base64: string; size?: { x: number; y: number; width: number; height: number; }; } |
Returns: Promise<any>
--------------------
`typescript`
addListener(eventName: 'printerStatusChange', listenerFunc: StateChangeListener) => Promise
| Param | Type |
| ------------------ | ------------------------------------------------------------------- |
| eventName | 'printerStatusChange' |
| listenerFunc | StateChangeListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
--------------------
#### PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
#### ConnectState
| Prop | Type | Description | Since |
| -------------- | -------------------- | --------------------------------- | ----- |
| isActive` | boolean | Whether the app is active or not. | 1.0.0 |
#### StateChangeListener
(state: ConnectState): void