yukimizake / ThermalDotNet

.Net (Mono-compatible) lightweight library for ESC POS thermal printers (like the Sparkfun's Thermal Printer COM-10438)
http://electronicfields.wordpress.com/2011/09/29/thermal-printer-dot-net/
GNU General Public License v3.0
111 stars 40 forks source link

USB not supported #3

Closed mmatousek closed 6 years ago

mmatousek commented 7 years ago

Hi, tried to use it with usb pos printer.... does not work, due to the fact, that usb is not serial.... Is there any kind of work around?

yukimizake commented 7 years ago

Hi, If you're on Windows be sure the "virtual" COM port of your printer is shown in the device manager. Then, use the right port number in your code like this : SerialPort printerPort = new SerialPort("COM1", 9600);

fookeong commented 7 years ago

Hi Sir, "virtual" COM port it is needed third party software??

mmatousek commented 6 years ago

https://download.epson-biz.com/modules/pos/index.php?page=soft&pcat=3&scat=36 That's the virtual COM-Driver for Epson-printers. Works fine. Be sure to assign USB-Printer to COM-port and then in Code:

SerialPort printerPort = new SerialPort("COM1", 9600); printerPort.Open(); ThermalPrinter printer = new ThermalPrinter(printerPort); printer.WriteLine("test"); printerPort.Close();

Worked fine for me.