react-native-bluetooth-serial
react-native-bluetooth-serial copied to clipboard
how to print using ecs/pos command ?
anyone can help me ?
@RaiiZen Check this: https://github.com/ingoncalves/escpos-xml It works for me.
It will create a buffer so you can pass it to the write method.
let encoder = new EscPosEncoder();
let result = encoder
.initialize()
.text("HelloWorld")
.newline()
.qrcode('HelloWorld')
.encode();
const { Buffer } = require('buffer');
BluetoothSerial.write(Buffer.from(result.buffer))