How can I print a Text file (receipt.txt) from VB.net to EPSON Printer using ESC/POS?
My printer is EPSON TM-U220D.
Printable View
How can I print a Text file (receipt.txt) from VB.net to EPSON Printer using ESC/POS?
My printer is EPSON TM-U220D.
I don't know what ESC or POS is, however if you're wanting to print in the .Net here are a few good links found here on the forum:
- A beginner's guide to printing in .net
- Printer class for vb.net
- DataGrid printer
- Printing multipage DGV
The first two are really what you need. The first should be read to educate yourself on printing in .Net, the second provides an easy to use class to print plain text.
thanks, what I mean is using ESC/POS code in printer which has no driver.. like in printing receipts in Point of Sales..
You would most likely need to either use a generic text only driver and print to that or if it is a serial printer then you could send the data directly out the serial port.
thanks, DataMiser but how can i that? kindly give me a sample of code please?
If you are using the generic text only print driver then you should have a look at this thread which I started a while back. Posts $3 and #5 show methods of doing this.
http://www.vbforums.com/showthread.p...005&highlight=
If you are not using a print driver and are connected with an RS232 connection then you would need to use serial communications to send the data to the printer. A quick search should land you some examples of how to use the serial port class for this.