sunmi_printer
sunmi_printer copied to clipboard
Not able to print Greek text
Hello there,
I trying to print greek letters to the Sunmi K2 printer.but this Kiosk printer is not printing Greek Letters. My code is as follows
List<int> bytes = [];
final profile = await CapabilityProfile.load();
final generator = Generator(PaperSize.mm80, profile, );
bytes +=generator.textEncoded(utf8.encode('! aΑΦΜ: 1234345'));
I tried using the below method as well.but didn't work.
Future<Uint8List> doEncode(String value)async{
return await CharsetConverter.encode("ISO-8859-7", value);
}
Please help me out.
@jibinjayachandran , can you use simply the
await SunmiPrinter.printText("! aΑΦΜ: 1234345");
it worked for me here
@jibinjayachandran
@brasizza Yes , this method works fine. I wanted to use with ese_pos_printer_utils in which the greek letters were not working. finally I found like changing the charset.
Future<Uint8List> doEncode(String value)async{
return await CharsetConverter.encode("gb18030", value);
}
this works fine.