tr3v3r / react-native-esc-pos-printer

An unofficial React Native library for printing on an EPSON TM printer with the Epson ePOS SDK for iOS and Epson ePOS SDK for Android
MIT License
137 stars 64 forks source link

Can't print other languages properly #135

Open doufu060514 opened 4 months ago

doufu060514 commented 4 months ago

Hi, I have a TM-T82IIIL printer and using latest version of the package. Can successfully initialize and print the english text. But it can't print other lanaguages like chinese or japanese properly (success if print with epson app). Example code & print results could be found below, any suggestion would be appricated

` EscPosPrinter.init({ target: 'TCP:192.168.50.222', seriesName: 'EPOS2_TM_T82', language: 'EPOS2_LANG_JA', })

printing .initialize() .align('center') .size(3, 3) .line('アラビア語!') .smooth(true) .cut() .send();

or

EscPosPrinter.init({ target: 'TCP:192.168.50.222', seriesName: 'EPOS2_TM_T82', language: 'EPOS2_LANG_ZH_CN', // Also tried EPOS2_LANG_ZH_TW })

printing .initialize() .align('center') .size(3, 3) .line('你好!') .smooth(true) .cut() .send(); `

a9294f772cd6a97cdd2e71807a75db89

tr3v3r commented 4 months ago

@doufu060514 hi ! is it for both platforms?

ahmad71666 commented 3 months ago

@tr3v3r can we print arabic somehow? or any workaround?

doufu060514 commented 3 months ago

Cool, I got a update on it, sorry for the late reply because i was waiting for the printer to be shipped from AU.

Might be silly but wish could at least help someone in future.

Thanks for another post regarding japenses mentioned "ANK", so what I have found from this hint is check the EPSON printer specification, if your one only has "ANK" in the characters, it can't print the other language properly even set the language code. Make sure the printer specification contains the characters (same serials may have different characters deponds on the country) you are using and should be able to print properly with it.

tr3v3r commented 3 months ago

@doufu060514 @ahmad71666

BTW guys you can use the beta version of this lib with a reworked printing approach. It resolves almost all known issues including this one with hardcoded ANK value.

Please check the details here

https://github.com/tr3v3r/react-native-esc-pos-printer/pull/139

ahmad71666 commented 3 months ago

@tr3v3r okay will check tomorrow, Appreciate your support, Thank You!