januslo / react-native-bluetooth-escpos-printer

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

BluetoothTscPrinter it's possible to use encoding and codepage ? #186

Open shinnachot opened 2 years ago

shinnachot commented 2 years ago

I would like to use BluetoothTscPrinter function to print my THAI language i research on this column and i cannot found it. I only found BluetoothEscposPrinter has function encoding to print my THAI language. Here is my code

i try to add encoding: 'Cp874', codepage: '255' at printLable option but it's not working

thank you for your help

BluetoothTscPrinter.printLabel(
    {
        width: 40,
        height: 30,
        gap: 20,
        direction: BluetoothTscPrinter.DIRECTION.FORWARD,
        reference: [0, 0],
        tear: BluetoothTscPrinter.TEAR.ON,
        sound: 1,
        encoding: 'Cp874',
        codepage: '255',
        text: [{
            text: 'ภาษาไทย',
            x: 20,
            y: 0,
            fonttype: 'Cp874',
            rotation: BluetoothTscPrinter.ROTATION.ROTATION_0,
            xscal: BluetoothTscPrinter.FONTMUL.MUL_1,
            yscal: BluetoothTscPrinter.FONTMUL.MUL_1
        }]

    }
shinnachot commented 2 years ago

anyone here ?