januslo / react-native-bluetooth-escpos-printer

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

How to bold the text on printText method? #53

Open rehancg opened 5 years ago

vikaskbh commented 4 years ago
@ReactMethod
    public void setBlob(int weight,final Promise promise) {
        if(sendDataByte(PrinterCommand.POS_Set_Bold(weight))){
            promise.resolve(null);
        }else{
            promise.reject("COMMAND_NOT_SEND");
        }
    }

That means, use setBlob > 0

mayniii commented 3 years ago

@rehancg @vikaskbh i use setBlob, it didnt bold the text.. anyone gt the solutions? And is it possible print text with large font size, without bold the the text?

valiaghaei commented 3 years ago
@ReactMethod
    public void setBlob(int weight,final Promise promise) {
        if(sendDataByte(PrinterCommand.POS_Set_Bold(weight))){
            promise.resolve(null);
        }else{
            promise.reject("COMMAND_NOT_SEND");
        }
    }

That means, use setBlob > 0

did you. find. any slution for increasing font size or bold ?

valiaghaei commented 3 years ago

@rehancg @vikaskbh i use setBlob, it didnt bold the text.. anyone gt the solutions? And is it possible print text with large font size, without bold the the text?

Excusemi , did you found any slution for increasing font size or bold ?

Jazibabdullah commented 2 years ago

hi, did @rehancg @vikaskbh @valiaghaei you guys find any solution?

Jazibabdullah commented 2 years ago

found solution: you can use, await BluetoothEscposPrinter.setBlob(1); before the text you want to print. As an ex: await BluetoothEscposPrinter.setBlob(1); await BluetoothEscposPrinter.printText( 'Hello World\n\r', {}, );

zhenguet commented 2 years ago

How about printColumn() with left column is bold but right is not bold?