januslo / react-native-bluetooth-escpos-printer

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

Print Vietnamese #125

Open huuanh021287 opened 4 years ago

huuanh021287 commented 4 years ago

Hello. I have problem printer vietnamese. Can you help me?

This is my code. await BluetoothEscposPrinter.printText('Tiếng Việt \r\n\r\n\r\n', { encoding: 'GBK', // Cp1256 or Cp1258 codepage: 32, // 27 or 22 or 30. widthtimes: 0, heigthtimes: 0, fonttype: 0, });

i use device xprinter 58iih.

image

Thanks

lamman999 commented 3 years ago

You can not print the Vietnamese characters with the 'GBK', // Cp1256 or Cp1258 encoding algorithm. We have to provide the TCVN encoding method for the library to make it possible. It seems not yet implemented in this release version.

nhatquang100 commented 3 years ago

-capture html to image with "react-native-view-shot" --> get base64 image -print it I sussed!

datpt11 commented 3 years ago

-capture html to image with "react-native-view-shot" --> get base64 image -print it I sussed!

Is multiple paper size ok?

hoanganhnh2009 commented 3 years ago

are you ready?

chaudev commented 1 year ago

Nguyên đám người việt dô nói chuyện bằng tiếng anh :v

honguyen25121991 commented 1 year ago

Nguyên đám người việt dô nói chuyện bằng tiếng anh :v Môi trường global mà :v Nói tiếng anh cho nó chuyên nghiệp =))