Bixolon SPP-R310 Esc/pos mobile bluetooth printer Image Printing error

767 Views Asked by At

I use react native and globally esc/pos mobile printing library, the library name is react-native-bluetooth-escpos-printer.

When I send an image(base64) then I have an error that a little print image(1 or 2 lines) and Bluetooth connection status is down.

//There is my react native code
async printImage(Base) {

    try {
        await BluetoothEscposPrinter.setWidth(576);
        await BluetoothEscposPrinter.printPic(Base, {width: 576, left: 0});
        await BluetoothEscposPrinter.printText("\r\n\r\n\r\n", {});
    } catch (e) {
        alert(e || "ERROR")
    }
}

When I send an image width is 200 pixels, there is no error but the image so small.

I used "await BluetoothEscposPrinter.setWidth(576)" but setWidth not working.

0

There are 0 best solutions below