Search code examples
flutterdartprintingescpos

How can i print arabic word in bluetooth printer in flutter


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.


Solution

  • 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