Access printer connected at Virtual Printer Port (USB001) using python-escpos on Windows 10

2.6k views Asked by At

I have created a printing module, which work with printer connected at serial port using printer.Serial("COM5") interface provided by python-escpos.

But now, I have to switch to USB printer rather than serial. My USB printer is connected at virtual printer port (USB001). Now, printer.USB() requires vendorID and productID but in my case when I see Device Instance Path, it does't contain vendorID and productID (screenshot is attached below). I am stuck here that how can I connect with this USB printer.

Please note that my printer is R290 thermal printer and I have downloaded its driver from http://itambition.com/printer.html. The printer is connected at USB001 and test page is being printed successfully.

enter image description here

1

There are 1 answers

0
Ahmad Raza On BEST ANSWER

I have resolved the issue using following steps:

  • connect USB printer
  • install R290 driver from http://itambition.com/printer.html. it will setup USB001 for usb printer
  • from printer & scanners menu, select printer properties and share the printer
  • open cmd as administrator and run:

net use lpt1 \your-systems-hostname\printer-sharename

  • now connect printer.File("LPT1") interface of python-escpos and start printing