kakzaki / blue_thermal_printer

Working with thermal printer via bluetooth (Flutter)
MIT License
164 stars 205 forks source link

Problem in typing Arabic letters #135

Closed mohammeddawida closed 2 years ago

mohammeddawida commented 2 years ago

There is a problem in typing Arabic letters I used the following code to print bluetooth.printCustom("HEADER", 3, 1); bluetooth.printCustom("Thank You", 2, 1); bluetooth.printCustom("شكرا لك", 2, 1); But this result appears in print 20220307_204950 How can i solve it?

as2a3 commented 2 years ago

@mahmmd I have the same problem, and can not print images in some printers, Did you find any solving?

shanubasheer commented 2 years ago

Me also have the same problem, can anybody help me?

mohammeddawida commented 2 years ago

@mahmmd I have the same problem, and can not print images in some printers, Did you find any solving?

Use this code to print the image final filename = 'yourlogo.png'; var bytes = await rootBundle.load("assets/images/yourlogo.png"); String dir = (await getApplicationDocumentsDirectory()).path; writeToFile(bytes, '$dir/$filename'); setState(() { pathImage = '$dir/$filename'; });

bluetooth.printImage(pathImage);

as2a3 commented 2 years ago

@mahmmd It does not work in Sunmi V2s printer.

as2a3 commented 2 years ago

@mahmmd

Did you solve Arabic letters problem?

mohammeddawida commented 2 years ago

@as2a3 Not yet

mohammeddawida commented 2 years ago

@as2a3 @shanubasheer I used this method and it worked for me https://github.com/kakzaki/blue_thermal_printer/issues/82#issuecomment-1048964685 20220316_001609

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.