Question

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.

Thanks in advance..

Was it helpful?

Solution

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

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"


UPDATE

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top