1

I'm using a printer: Zebra ZQ220

I'm currently using:

  • esc_pos_utils: ^1.1.0
  • flutter_pos_printer_platform: ^1.0.12

The printer prints English successfully. but when we try to print Arabic, it prints strange characters not the arabic text.

I tried two ways to send encoded string:

First:

final arabicText = utf8.encode('شركه هنا');
Uint8List uint8List = Uint8List.fromList(arabicText);
bytes += generator.textEncoded(uint8List);

First way output (utf8_Arabic):

======================================================

Second:

final List<int> codeUnits = 'شركه هنا'.codeUnits;    
final Uint8List unit8List = Uint8List.fromList(codeUnits);
bytes += generator.textEncoded(unit8List);

Second way output (codeUnits_Arabic):

Also, I set the Code page to "CP1252", but this code page works fine in English not Arabic.

rainbow.gekota
  • 1,075
  • 2
  • 6
  • 18
  • This is a different printer vendor and model, but probably the same issue. [How to print Arabic letters with thermal printer using Flutter esc_pos_printer library?](https://stackoverflow.com/q/66355251/9014308) – kunif Jan 24 '23 at 01:43

1 Answers1

0

I eventually found some useful Flutter SDKs for Thermal Printers that offer support for multiple languages including Arabic language:

  • bluetooth_thermal_printer - This is a Flutter plugin that allows you to use a Bluetooth thermal printer on Android device.
  • blue_print_pos - This is a Flutter plugin that enables you to use a POS (point of sale) system on both Android and iOS device.
    This is the updated forked blue_print_pos SDK which I used in Dec, 2022. You can use it without facing any issues.
ankushlokhande
  • 870
  • 5
  • 20
  • This package is not being compiled. – EmreSURK Jul 24 '23 at 11:25
  • run `flutter pub get` & 'flutter run'. for iOS, install pod first. – ankushlokhande Jul 24 '23 at 13:38
  • Yep, of course, I did this. Here is the error if you want to have a look: > No signature of method: build_2ygzesu3y6gr9h0cwn2zbcldh.android() is applicable for argument types: (build_2ygzesu3y6gr9h0cwn2zbcldh$_run_closure2) values: [build_2ygzesu3y6gr9h0cwn2zbcldh$_run_closure2@723adabf] – EmreSURK Jul 24 '23 at 13:58
  • Error is due to internal issue of Android project build script (build.gradle). Please check this if useful in your case: https://stackoverflow.com/questions/67418660/no-signature-of-method-android-is-applicable-for-argument-types-exception-i – ankushlokhande Jul 25 '23 at 10:24
  • I checked the answers but had no luck. Is this repo being compiled on your machine? Maybe you can share what you changed specifically. – EmreSURK Jul 26 '23 at 10:33
  • which package code you are looking for? blue_print_pos SDK ? – ankushlokhande Jul 26 '23 at 13:50
  • yes. blue_print_pos is being compiler. blue_print_pos SDK(your repo) is being compiled when I create a fresh Flutter project. The problem is you repo is being compiled with my current project. Maybe, if you changes are small, I can apple them by myself. Any other suggestion is appreciated. Thank you for your time and effort. – EmreSURK Jul 27 '23 at 12:35
  • There is one solution, You can fork my repo & use code. If not works let me know. I will find another way. – ankushlokhande Jul 27 '23 at 12:46
  • Also you can check my commits & make changes in your code [commits](https://github.com/andriyoganp/blue_print_pos/compare/master...ankush-ppie:blue_print_pos:master) – ankushlokhande Jul 27 '23 at 12:48
  • Nope, it is not solved. I compiled the project. Apparently, the build problem happens because of a sub-dependency. After I compiled it, the code didn't print anything and gave 'context is not an activity error'. If you are available, I would like to take professional support from you. Please get in touch with me: emre.surk [at] gmail [dot] com Thanks. – EmreSURK Jul 29 '23 at 09:14