UNPKG

react-native-thermal-pos-printer

Version:

React Native thermal printer package for POS systems supporting Xprinter and other popular brands

31 lines (30 loc) 1.35 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = exports.PosPrinter = void 0; var _reactNative = require("react-native"); const { PosPrinter } = _reactNative.NativeModules; if (!PosPrinter) { throw new Error('PosPrinter native module is not available. Make sure the library is properly linked.'); } const PosPrinterModule = exports.PosPrinter = { init: options => PosPrinter.init(options), getDeviceList: () => PosPrinter.getDeviceList(), connectPrinter: (address, type) => PosPrinter.connectPrinter(address, type), disconnectPrinter: () => PosPrinter.disconnectPrinter(), isConnected: () => PosPrinter.isConnected(), printText: (text, options) => PosPrinter.printText(text, options), printImage: (base64Image, options) => PosPrinter.printImage(base64Image, options), printBitmap: base64Data => PosPrinter.printBitmap(base64Data), printBarcode: (data, type, options) => PosPrinter.printBarcode(data, type, options), printQRCode: (data, options) => PosPrinter.printQRCode(data, options), cutPaper: () => PosPrinter.cutPaper(), openCashDrawer: () => PosPrinter.openCashDrawer(), sendRawCommand: command => PosPrinter.sendRawCommand(command), getStatus: () => PosPrinter.getStatus() }; var _default = exports.default = PosPrinterModule; //# sourceMappingURL=native.js.map