andrey-ushakov / esc_pos_printer

ESC/POS (thermal, receipt) printing for Flutter & Dart
BSD 3-Clause "New" or "Revised" License
353 stars 300 forks source link

Can't support Arabic language #84

Open MustafaGamalAbbas opened 4 years ago

Rabeeh96 commented 3 years ago

any solutin? @andrey-ushakov

MustafaGamalAbbas commented 3 years ago

@Rabeeh96
I had worked around creating a widget with my specific design requirements and take a screenshot of this widget and then send it to the printer to print it as an image.

ul-rotha commented 3 years ago

@MustafaGamalAbbas after capture big size of bytes image does your printer stuck ?

MustafaGamalAbbas commented 3 years ago

@ul-rotha it depends on the quality of the printer and the status of the internet, but for me, I had tried to print an invoice 1m long, and it works well.

s2yed commented 3 years ago

Can't support Arabic language

[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: Invalid argument (string): Contains invalid characters.: "بسم الله الرحمن الرحيم" [ ] E/flutter (26083): #0 _UnicodeSubsetEncoder.convert (dart:convert/ascii.dart:89:9) [ ] E/flutter (26083): #1 Latin1Codec.encode (dart:convert/latin1.dart:40:46) [ ] E/flutter (26083): #2 Generator._encode (package:esc_pos_utils/src/generator.dart:77:21) [ ] E/flutter (26083): #3 Generator.text (package:esc_pos_utils/src/generator.dart:354:9)

xSuperMu commented 3 years ago

Which printer do you use?

s2yed commented 3 years ago

printer "بسم الله الرحمن الرحيم"

blackangiliq commented 2 years ago

u can use this

you can check this

this repo use 3 laiblary

secreenshot to convert widget to image and image library to convert it to uint8 and pos_print to print it ass u love to show

https://github.com/blackangiliq/flutter_pos_printer_spport_arabic