C#POS快速收据打印 [英] C# POS fast receipt printing

查看:133
本文介绍了C#POS快速收据打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打印我的POS应用程序的收据(Winform C#) 我的第一个尝试是使用Crystal Report,但是当有许多客户排队时,这还不够快,甚至有些客户都会下线. 所以我有想法在DOS模式下打印.我创建一个虚拟文件并将其发送到PRN. 它运行良好,足够快,但是我想了一下.还有其他更好的方法吗?我的意思是不是不是先创建一个虚拟文件,而是从C#本身逐行打印? 当然一定要快.

I'd like to print the receipt of my POS application (Winform C#) My first attempt is using crystal report, but it's no fast enough when there're many customers in line, even some of them will leave the line. So I have idea to print in DOS mode. I create a dummy file and send it to PRN. It's working well, fast enough but then I have a thought.. Is there any other better way to do? I mean it's not by creating a dummy file first, but print line by line from C# itself? of course it must be fast.

先谢谢了.

推荐答案

在这里查看我的答案:

See my answer here: print on dot matrix printer in .net

无需创建中间文件并将其发送到PRN;只需添加 Generic/Text Only 打印机,然后打印到该驱动程序即可.为此,请在C#中打开指向"PRN"或"LPT1"的文件句柄,然后可以根据通过打开"PRN"或"LPT1"获得的文件句柄直接打印到该文件句柄.

No need to create an intermediary file and send it to PRN; just add a Generic / Text Only printer, and then print to that driver. To do that, open a file handle to "PRN" or "LPT1" in C#, then you can directly print to it based on the file handle you obtained from opening "PRN" or "LPT1"

更新

此处的代码可能会帮助您:在C#中打印到LPT1

Code here might help you: Printing to LPT1 in C#

这篇关于C#POS快速收据打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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