auctifera-josed / starprnt

Cordova plugin for the Star micronics printers
MIT License
40 stars 39 forks source link

USB printing #14

Open joseph-perez opened 6 years ago

joseph-perez commented 6 years ago

Hi there, I was having trouble printing through a usb connection. The usb receipt printer is returned when using the port discovery method but when using the port name to print nothing happens. It looks like maybe it's a problem in the sendCommands method in Communication.m. I noticed the other star receipt cordova plugins suffer from this same problem. Any help is much appreciated, thanks for your time!

Printer being used: TSP100III

infoxicator commented 6 years ago

Hi @joseph-perez did you manage to solve the issue?

joseph-perez commented 6 years ago

Yeah I think so. So it turns out that everything works correctly it was just the method I was using. When printing through usb you have to use the printRasterReceipt method because some Star receipt printers use line mode a raster mode. Receipt printers are so complicated! haha

infoxicator commented 6 years ago

hi @joseph-perez the printRasterReceipt function doesn't use the command builder interface, so I guess the bug is still there. I don't have a USB printer to test, so would you be able to test it for me once I have tracked down the bug?

joseph-perez commented 6 years ago

Yeah no worries, I can test it out