使用C#为POS打印机编码Esc字符 [英] Coding Esc Chars in C# for a POS printer

查看:158
本文介绍了使用C#为POS打印机编码Esc字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

感谢这个论坛,我已经能够重写触摸屏信息亭应用程序,以使我们的客户可以自行登录.我正在使用Winforms,C#和MS-SQL.到目前为止一切都很好.

最初使用ASP/Javascript编写且已使用8年以上的原始应用程序也已打印到与自助服务终端相连的POS热敏打印机上.当我使用我的应用程序在同一台打印机上打印时,即使可以在连接的激光打印机上正常打印,也无法完全关闭打印输出.

我正在浏览打印机附带的命令代码文档,但是遇到了我以前从未做过的事情,并且似乎无法在我完成的所有谷歌搜索中找到.我不知道如何向打印机提供执行其所需操作所需的命令代码(ESC代码).例如,我需要向打印机发送一个Esc代码序列,以切换到页面模式以及要打印数据的页面大小.

这可能吗,还是我需要找到其他方法?

任何建议将不胜感激.

Thanx to this forum I have been able to rewrite a touchscreen kiosk application to allow our customers to check themselves in. I am using Winforms, C# and MS-SQL. So far so good.

The original application written in ASP/Javascript and over 8 years old also printed to a POS thermal printer attached to the kiosk. When I print to the same printer with my application, the print out is not even close even though it will print okay to an attached laser printer.

I am exploring the command code documentation that came with the printer but am running into something I''ve never done before and cannot seem to find in all the Googling I''ve done. I do not know how I can feed the printer the command codes (ESC codes) needed to make it do what I need it to do. For example, I need to send the printer an Esc code sequence to switch to page mode along with the size of the page where the data will be printed.

Is this possible or do I need to find some other way?

Any advise will be much appreciated.

推荐答案

如果您有命令代码文档和打印机型号,那么首先要寻找的是SDK或API规范
If you have command code documentation and a printer model, then the first place to look would be for an SDK or API specification from the manufacturer.


此处类似的讨论.可能会帮助您获得一些想法.

打印并将命令发送到收据打印机 [ ^ ]
Similar discussion here. May help you to get some idea.

Print and send commands to receipt printer[^]


您可能会发现以下有用:
http://www.microsoft.com/dynamics/rms/using/oposcontrols.htm [ ^ ]

可以通过
You may find the following useful:
http://www.microsoft.com/dynamics/rms/using/oposcontrols.htm[^]

That one, and a bunch of others, can easily be found by leveraging your Google-Fu skills[^]

Regards
Espen Harlinn


这篇关于使用C#为POS打印机编码Esc字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆