c# 使用 PosExplorer 发送转义序列
我正在尝试将转义序列发送到热敏打印机(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 文档中提取了它们。
感谢您的帮助。
I'm trying to send escape sequence to a thermal printer (Epson TM-T20). Now I can print, but when I make this:
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"));
The printer only prints "Print example", the escape sequences being ignored. I supose that escape sequences are correct because I extracted them from epsonExpert documentation.
Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您尝试过 Enviroment.NewLine 吗?
Have you tried with Enviroment.NewLine ?