giorgiofellipe / cordova-plugin-datecs-printer

Cordova plugin to print on Mobile Bluetooth ESC/POS Printers - Tested on Datecs DPP-250 Printer
MIT License
73 stars 60 forks source link

Event when Paper cover opened #128

Open pilz97 opened 5 years ago

pilz97 commented 5 years ago

Is it possible to get an event when the paper cover is open?

I am sending printjobs from a backend to my cordova app, the cordova app send a delete when de printjob was executed successful, when I open the paper cover on my printer (Bixolon SPP-R200II) the plugin does not notice that and that's why it looks like the print job was executed successfull and in my case the printjob will get deleted altough the job hasn't printed out yet. WHen you close the cover again then the printer will start printing but when you shutdown the printer before closing the cover the job will get lost in my case.

Do you have any solution to solve my problem?

On which models should the hasPaper Event work? I have a Bixolon SPP-R200II and MPT-II on both the event doesn't get fired when the printers are out of paper!

csleeds commented 5 years ago

Refers the connectionstatus event section in readme.md from the latest version 0.9.0, you can now retrieve the connection status to check if the printer has paper. i personally haven't got time to test that out yet, please let us know if you able to get it work based on your scenario, tq.