如何使用 esc_pos_utils_plus flutter 打印 £ €

问题描述 投票:0回答:1

我正在尝试使用 this 打印机的 esc_pos_utils_plus 包打印 £ 和 € 符号,但它打印 Û
当我使用以下配置文件时:

final profile = await CapabilityProfile.load('XP-N160I');
final generator = Generator(PaperSize.mm80, profile);
bytes += generator.setGlobalCodeTable('CP1252');

代码:

   List<int> bytes = [];
      final profile = await CapabilityProfile.load('XP-N160I');
      final generator = Generator(PaperSize.mm80, profile);
      bytes += generator.setGlobalCodeTable('CP1252'); //I have also tested CP437
      bytes +=  generator.text("Amount £50");
      bytes += generator.cut();
      await _print(data: bytes);

这里,输出是

Amount 50
但是如果我删除配置文件和 GlobalCodeTable,输出是
Amount Û50

如何解决这个问题?

flutter thermal-printer
1个回答
0
投票

请尝试一下,我可以在 XP-N160I 中打印

您可能还需要在打印机中设置正确的代码页

generator.rawBytes([0x80]);

© www.soinside.com 2019 - 2024. All rights reserved.