We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am make this code:
Future<String> print(dynamic pedido) async { List<int> bytes = []; final profile = await _profile; final generator = Generator(PaperSize.mm80, profile); bytes += [27, 97, 1]; bytes += generator.text('Pedido #${pedido['id']}', styles: const PosStyles(bold: true, height: PosTextSize.size2)); bytes += [27, 97, 1]; bytes += generator.text('Cliente : ${pedido['customer']['user']['name']}'); bytes += generator.text('Email : ${pedido['customer']['user']['email']}'); bytes += [27, 97, 1]; bytes += generator.feed(1); bytes += generator.row([ PosColumn( text: 'Quant', width: 2, styles: const PosStyles(align: PosAlign.left), ), PosColumn( text: 'Item', width: 8, styles: const PosStyles(align: PosAlign.center), ), PosColumn( text: 'Preco', width: 2, styles: const PosStyles(align: PosAlign.right), ), ]); for (var item in pedido['products']) { bytes += generator.row([ PosColumn( text: item['pivot']['quantity'].toString(), width: 2, styles: const PosStyles(align: PosAlign.center), ), PosColumn( text: '${item['name']} (${item['description']})', width: 8, styles: const PosStyles(align: PosAlign.center), ), PosColumn( text: ' ${item['pivot']['subtotal'].toString()}', width: 2, styles: const PosStyles(align: PosAlign.center), ), ]); } bytes += generator.feed(1); bytes += [27, 97, 1]; bytes += generator.text('Total R\$ ${pedido['total_price']}'); bytes += [27, 97, 1]; bytes += generator.text('Data : ${pedido['created_at']}'); bytes += generator.feed(1); bytes += generator.text('*** Obrigado por seu ço pédido ***', styles: const PosStyles(bold: true, height: PosTextSize.size2), containsChinese: true); bytes += generator.feed(1); bytes += generator.cut(); final res = await usb_esc_printer_windows.sendPrintRequest(bytes, _printerName); String msg = ""; if (res == "success") { msg = "Printed Successfully"; } else { msg = "Failed to generate a print please make sure to use the correct printer name"; } return msg; }
Along these lines, I even tried some settings, but it didn't help.
bytes += generator.text('*** Obrigado por seu ço pédido ***', styles: const PosStyles(bold: true, height: PosTextSize.size2), containsChinese: true);
Thanks
The text was updated successfully, but these errors were encountered:
It is specified in the documentation how to work with accents
bytes += generator.text('Special 1: àÀ èÈ éÉ ûÛ üÜ çÇ ôÔ', styles: PosStyles(codeTable: PosCodeTable.westEur));
Sorry, something went wrong.
thanks
No branches or pull requests
Hi,
I am make this code:
Along these lines, I even tried some settings, but it didn't help.
bytes += generator.text('*** Obrigado por seu ço pédido ***', styles: const PosStyles(bold: true, height: PosTextSize.size2), containsChinese: true);
Thanks
The text was updated successfully, but these errors were encountered: