使用Esc / Pos进行打印 [英] Using Esc/Pos for printing purposes
问题描述
我正在写一个节目。这是一个厨房视频屏幕。
我正在处理的软件能够通过Windows打印机驱动程序打印,或直接通过发送escpos命令。 />
使用Windows打印驱动程序虽然更容易,但不像我需要的那样灵活,能够通过信息加密来为某些部分提供不同的字体属性打印工作。 (EG我需要大量打印的产品,我需要附带的产品来打印小而红的颜色)
所以,我试图理解我如何在我的软件中加入Escpos
(同时也节省了我加载打印驱动程序的效果更好,因为它使用更少的资源)
Escpos是Epson开发的一种打印语言,允许您将参数设置为即将打印的字符串,包括大小,颜色。
有人可以给我一个提示,这是我项目的下一个重要部分,我不确定从哪里开始。
我猜我需要写一个有类的课程所有的escpos命令,当从传入端口读取一行时,它将根据我创建的类进行编码。
我的头说我需要写一大堆If语句,但我确信会有更简单的方法。
I'm writing a program at the moment. It's a Kitchen Video Screen.
The software I'm dealing with has the ability to either print via a windows printer driver, or directly via sending escpos commands.
Using the windows print driver, while much easier, isn't as flexible as I need to be able to cipher through the information to give different font properties to certain sections of the print job. (EG I need products to print in large, and I need the products attached to that to print small and in red colour)
So, I'm trying to understand how I can incorporate Escpos within my software
(Also saves me from loading print drivers which is better as it is using less resources)
Escpos is a printing language developed by Epson that allows you to set parameters to the string that's about to be printed, including size, colour.
Could someone give me a hint, this is the next big part of my project, and I'm not to sure where to start.
I'm guessing I need to write a class that has all of the escpos commands, and as a line is read from the incoming port, it would then be encoded as per the class I have created.
My head is saying that I need to write a whole bunch of If statements, but I'm sure there would be a much easier way to do it.
推荐答案
为什么不使用已经为.NET编写的Microsoft POS软件而不是直接使用这种Epson语言?请参阅:
http:// msdn .microsoft.com / zh-CN / library / dd125967%28v = winembedded.10%29.aspx [ ^ ]。
参见:
http://msdn.microsoft.com/ en-us / library / ms828083%28v = winembedded.10%29.aspx [ ^ ],
http://msdn.microsoft.com/en-us/library/dd143192%28v=winembedded.10%29.aspx [<一个href =http://msdn.microsoft.com/en-us/library/dd143192%28v=winembedded.10%29.aspxtarget =_ blanktitle =New Window> ^ ]。
-SA
Instead of using this Epson language directly, why not using Microsoft POS software already written for .NET? Please see:
http://msdn.microsoft.com/en-us/library/dd125967%28v=winembedded.10%29.aspx[^].
See also:
http://msdn.microsoft.com/en-us/library/ms828083%28v=winembedded.10%29.aspx[^],
http://msdn.microsoft.com/en-us/library/dd143192%28v=winembedded.10%29.aspx[^].
—SA
我还需要解析ESC-POS文件并在屏幕上显示它们。
你能否发布你的代码在这里我可以使用它吗?
我真的很感激,谢谢!
Hi,
I also need to parse ESC-POS files and display them on screen.
Can you please post your code here so I can use it?
I would really appreciate it, thanks!
这篇关于使用Esc / Pos进行打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!