1

I am using esc_pos_bluetooth package for printing but I cannot print arabic word in it I tried to convert it into image code is `

  List<int> list = description.codeUnits;
          Uint8List data = Uint8List.fromList(list);
          final bytes=data.buffer.asUint8List();
          final image= img.decodeImage(bytes);
           ticket.image(image);

` but this show error like this

Unhandled Exception: NoSuchMethodError: The getter 'width' was called on null

how can i fix this how can i print arabic word in bluetooth printer.

Sibi Kumar
  • 72
  • 8
  • Could you post a [mcve] please? We have no idea what `description.codeUnits` is, and your error does not seem to come from this piece of code either. – nvoigt Feb 09 '23 at 06:55
  • decription is arabic word for example 'السلام عليكم' – Sibi Kumar Feb 09 '23 at 07:12
  • 1
    Perhaps, this article will help you. [How to print Arabic letters with thermal printer using Flutter esc_pos_printer library?](https://stackoverflow.com/q/66355251/9014308) – kunif Feb 09 '23 at 13:15
  • No i allredy read this article I tried out the solution also but not working – Sibi Kumar Feb 13 '23 at 07:14
  • Is there is any way to print arabic word in bluetooth printing using esc_pos_bluetooth this package – Sibi Kumar Feb 13 '23 at 07:15

1 Answers1

1

I faced a similar issue when trying to print Arabic characters, and I tried several packages. However, I eventually found some useful Flutter SDKs for Thermal Printers that offer support for multiple languages:

  • bluetooth_thermal_printer - This is a Flutter plugin that allows you to use a Bluetooth thermal printer only for Android devices.
  • blue_print_pos - This is a Flutter plugin that enables you to use a POS (point of sale) system on both Android and iOS devices.
    This is the updated forked blue_print_pos SDK which I used in JAN, 2023. You can use it without facing any issues.

ENGLISH VERSION

ARABIC VERSION

ankushlokhande
  • 870
  • 5
  • 20