januslo / react-native-bluetooth-escpos-printer

React-Native plugin for the bluetooth ESC/POS & TSC printers.
MIT License
367 stars 424 forks source link

printBarcode font spacing #203

Open amerytcl97 opened 2 years ago

amerytcl97 commented 2 years ago

Screenshot 2022-08-29 at 4 38 47 PM

It is possible to print out shown barcode font with ESC. Currently the barcode font is spaced out and I want it tight

Example : [1 2 4 5 6] to [12456]

I have tried printText below printBarcode but there is a big margin between them.

Current code

const barcode_WIDTH = 2.25; const barcode_HEIGHT = 31.75; const barcode_FONT_TYPE = 0; const barcode_FONT_POSITION = 2; try { await BluetoothEscposPrinter.printerAlign( BluetoothEscposPrinter.ALIGN.CENTER, ); await BluetoothEscposPrinter.printBarCode( barCode, BluetoothEscposPrinter.BARCODETYPE.CODE128, barcode_WIDTH, barcode_HEIGHT, barcode_FONT_TYPE, barcode_FONT_POSITION, ); await BluetoothEscposPrinter.printerAlign( BluetoothEscposPrinter.ALIGN.CENTER, ); } catch (error) { alert(error); }