Hello,
Newbie here. I followed the exact exercise in the tutorial, but I got an error..
I got the first console.log, but not the second, as it was errored out.
Please help!
qz.websocket.connect().then(function() {
return qz.printers.find("POS-Printer").then(function(found) {
console.log("Printer: "+JSON.stringify(found));
});
}).then(function(printer) {
var config = qz.configs.create(printer);
var data = ['The quick brown fox jumped over the lazy dog'];
return qz.print(config, data).then(function(data) {
console.log('Sent to printer:'+JSON.stringify(data));
});
}).catch(function(e) {
console.error(e);
});
_qz.websocket.connection.onmessage @ qz-tray.js:306
opossum:1617 Error: A printer must be specified before printing
at WebSocket._qz.websocket.connection.onmessage (qz-tray.js:304)