Capacitor plugin to send ZPL messages directly to Zebra printers via TCP/IP. It is a combination of ionic-zebra-printer android implementation and ionic-zebra-label-printer iOS implementation.
- Add fetch timeout
- Fix android connection problems
- Add iOS implementation
yarn add capacitor-zebra-printeror
npm install capacitor-zebra-printerand finally
npx cap syncimport { CapacitorZebraPrinter } from "capacitor-zebra-printer";
const printUtils = {
printZpl: async ({
zpl,
ip,
port,
}: {
zpl: string;
ip: string;
port: number;
}) => {
return await CapacitorZebraPrinter.print({
ip,
port,
zpl,
}).then((res) => {
return res && res.value == "success";
});
},
};
export default printUtils;echo(options: { value: string; }) => Promise<{ value: string; }>| Param | Type |
|---|---|
options |
{ value: string; } |
Returns: Promise<{ value: string; }>
print(options: PrintOptions) => Promise<{ value: string; }>| Param | Type |
|---|---|
options |
PrintOptions |
Returns: Promise<{ value: string; }>
{ ip: string; port: number; zpl: string }