react-native-bluetooth-serial icon indicating copy to clipboard operation
react-native-bluetooth-serial copied to clipboard

how to print using ecs/pos command ?

Open ghost opened this issue 7 years ago • 2 comments

anyone can help me ?

ghost avatar Dec 23 '17 10:12 ghost

@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.

devfelipereis avatar Feb 15 '18 19:02 devfelipereis

let encoder = new EscPosEncoder();

let result = encoder
  .initialize()
  .text("HelloWorld")
  .newline()
  .qrcode('HelloWorld')
  .encode();

const { Buffer } = require('buffer');

BluetoothSerial.write(Buffer.from(result.buffer))

chamaloriz avatar Sep 29 '19 10:09 chamaloriz