React Native - React-Native-bluetooth-escpos-Printer

Asked

Viewed 40 times

0

I am implementing the printing of a ticket via the React-Native-bluetooth-escpos-Printer lib. I can connect and print. The problem is that in printing, is added the characters &M before any text and accents are not being recognized. Blue Bamboo thermal printer model. On another printer model (DATECS DPP350), print -& before any text. Is there any way to escape these characters?

Follow the example code:

await BluetoothEscposPrinter.printerUnderLine(0)
                await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.CENTER);
                await BluetoothEscposPrinter.printText("Código: 103858204\n\r", {
                  encoding: 'UTF8',
                  codepage: 0,
                  widthtimes: 0,
                  heigthtimes: 0,
                  fonttype: 1
                });
                await BluetoothEscposPrinter.printerAlign(BluetoothEscposPrinter.ALIGN.LEFT);
                await BluetoothEscposPrinter.printText("Impressão de bilhete\n\r", {
                  encoding: 'UTF8',
                  codepage: 0,
                  widthtimes: 0,
                  heigthtimes: 0,
                  fonttype: 1
                });
                await BluetoothEscposPrinter.printText("---------------------------\n\r", {});

Impressora Blue Bamboo

Impressora DATECS DPP350

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.