销售点申请收据打印
我正在开发一个零售管理软件的小项目,该项目将使用 POS 打印机(我想这就是我们所说的)。我最终需要为其创建一个账单。但我被困在这里,无法继续。因此,假设如果我以适当尺寸(POS 账单宽度)的单独表格生成账单,我是否能够正确打印它? 我正在使用 C# 和 .NET 4.0 框架。我对POS机了解不多。我正在为一个真正需要基本软件模型的本地小客户工作。我也是新人,请大家帮帮我。
如果我的问题不清楚,请告诉我,我会尽力阐述我的想法。
I am working on a small project for a Retail Management Software, which will be using a POS printer (I think that's what we call it). I need a create a bill for it in the end. But i am stuck here, and not able to proceed. So suppose if I generate my bill in a separate form with appropriate dimensions (of width of POS bills), will i be able to print it properly?
I am using C# and .NET 4.0 framework. I don't have much knowledge about POS devices. I am working for really a small local client which needs a basic model of software. I am also a fresher so please help me out.
If my question is not clear, let me know i will try to elaborate my thought.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我知道这是一篇旧文章,但对于那些仍在寻找解决方案的人,我可以告诉你我做了什么。
在花了很多时间研究 OPOS 和 POS for .Net 之后,我最终放弃了这些,只使用内置的 System.Drawing.Printing 库。 OPOS 和 .Net 的 POS 最终变得很难工作,并且最终无法像内置库那样工作。
我使用的是 Epson TM-T20II 收据打印机。
这是一些对我来说效果很好的代码。
希望它可以帮助人们跳过自定义驱动程序的所有混乱。 :)
I know this is an old post, but for those still looking for a solution, I can tell you what I did.
After spending many hours messing with OPOS and POS for .Net, I ended up just abandoning those and just using the built-in System.Drawing.Printing libraries. The OPOS and POS for .Net ended up being a pain to get working and ultimately didn't work as well as the built-in libraries.
I'm using an Epson TM-T20II receipt printer.
Here's some code that worked well for me.
Hopefully it helps someone skip all the messing around with custom drivers. :)
好吧,我设计了一个 POS 应用程序(在 Delphi 中),尽管打印收据或账单存在很多小问题,但这并不是什么复杂的事情。我只是简单地打印收据,像任何其他打印机一样打印,不同之处在于您发送 30-38 个字符长的行(取决于打印机驱动程序、字体和大小)。首先,您可以使用两种方法进行打印:发送 Ascii 字符并发送特定打印机的打印机命令(设置字体样式、颜色等),或者第二种方法是使用 C# 设置字体、大小等,如打印到任何其他普通/桌面打印机。
您可以尝试按照页面示例和我的建议进行打印:
http://ondotnet.com/pub/a/dotnet/2002 /06/24/printing.html
Well I designed a POS application (in Delphi) and altough there are many little issues with printing a receipt or a bill it´s not rocket science. I just print a receipt by simply, well, printing like any other printer, the difference is that you send lines of 30-38 characters long (depending on the printer driver, font and size). To start, you could print using 2 methods: Sending Ascii characters and sending printer commands (to set the font style, color, etc) for that specific printer or the second method is to set the font, size, etc using C# like printing to any other normal/desktop printer.
You could try printing following the example of the page and my suggestions:
http://ondotnet.com/pub/a/dotnet/2002/06/24/printing.html