c#使用PosExplorer发送转义序列

时间:2011-12-26 20:44:30

标签: c# thermal-printer

我正在尝试将转义序列发送到热敏打印机(Epson TM-T20)。现在我可以打印,但是当我这样做时:

string ESC = Convert.ToString((char)27);
string logo=Convert.ToString(ESC+"|tL");
_oposPrinter.PrintNormal(PrinterStation.Receipt, logo);
_oposPrinter.PrintNormal(PrinterStation.Receipt, "Print example\n");
_oposPrinter.PrintNormal(PrinterStation.Receipt, Convert.ToString((char)27 + "|#fP"));

打印机仅打印“打印示例”,忽略转义序列。我认为转义序列是正确的,因为我从epsonExpert文档中提取它们。

感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

您是否尝试过Environment.NewLine?

_oposPrinter.PrintNormal(PrinterStation.Receipt, "Print example"+ Environment.NewLine);
相关问题