设计原始数据打印
我在将原始数据发送到收据打印机时遇到困难。我正在使用内置 C#(Visual Studio 2008,FrameWork 3.5)PrintDocument() 函数。但向打印机发送数据时速度很慢。并让我的程序忙碌起来。所以我开始搜索来解决这个问题,我发现了这个。很棒的文章,我可以直接打印到打印机,但我无法设计。例如:
Quan: Product Name: Total:
------------------------------------
1 x Product 1 1,5 USD
2 x Product 2 2,5 USD
------------------------------------
Bill No : 5126
User : SomeUser
THANKS FOR COMING
上面设计了我想要的,但我做不到。我读过一些有关 ESC 代码的内容,但我找不到如何正确使用它,当然也不知道 ESC 代码是什么。我读了很多文章,但找不到清楚的例子。总之
如何使用 ESC 代码设计原始数据
I having difficulties when sending Raw Data to receipt printer. I am using Builtin C# (Visual Studio 2008 ,FrameWork 3.5) PrintDocument() function. But it is slow while sending data to printer. And keeps busy my program. So I started to search to overcome this problem and I found this. Great article, I can print directly to printer, but I am unable to design. For ex:
Quan: Product Name: Total:
------------------------------------
1 x Product 1 1,5 USD
2 x Product 2 2,5 USD
------------------------------------
Bill No : 5126
User : SomeUser
THANKS FOR COMING
Above design what I want, but I couldn't make it. I read something about ESC code but I couldn't found how to use it properly, and of course WHAT ARE THE ESC CODES. I read lots of article but I couldn't found an example clearly. In a word
HOW TO DESIGN RAW DATA USING ESC CODES
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
以正常方式打印怎么样(我假设你让它按照你想要的方式工作,除了它阻止你的程序并且“慢”)?您可以简单地从单独的线程调用正常的打印例程(可能每台打印机只有一个线程,您可以将其重新用于后续作业)。
How about printing the normal way (I assume you had it working how you wanted apart from it blocking your program and being "slow")? You could simply call the normal print routine from a separate thread (probably just one thread per printer which you could re-use for subsequent jobs).