Connects a web client to the QZ Tray software. Enables printing and device communication from javascript.
npm install qz-tray``js
const qz = require("qz-tray");
qz.websocket.connect().then(() => {
return qz.printers.find();
}).then((printers) => {
console.log(printers);
let config = qz.configs.create('PDF');
return qz.print(config, [{
type: 'pixel',
format: 'html',
flavor: 'plain',
data: '