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: '<h1>Hello JavaScript!</h1>'
}]);
}).then(() => {
return qz.websocket.disconnect();
}).then(() => {
// process.exit(0);
}).catch((err) => {
console.error(err);
// process.exit(1);
});
Versions
Current Tags
Version | Downloads (Last 7 Days) | Tag |
---|---|---|
2.2.4 | 6,356 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|---|---|
2.2.4 | 6,356 | |
2.2.3 | 14,882 | |
2.2.2 | 998 | |
2.2.1 | 2,729 | |
2.2.0 | 73 | |
2.1.4 | 286 | |
2.1.3 | 341 | |
2.1.2 | 215 | |
2.1.1-1 | 7 | |
2.1.1 | 4 | |
2.1.0-2 | 82 | |
2.1.0-1 | 0 | |
2.1.0 | 241 | |
2.0.11 | 259 | |
2.0.10 | 43 | |
2.0.9-1 | 0 | |
2.0.9 | 5 | |
2.0.8 | 2,829 | |
2.0.7 | 11 | |
2.0.6-1 | 0 | |
2.0.6 | 152 | |
2.0.4 | 1 | |
2.0.3-1 | 57 | |
2.0.3 | 0 | |
2.0.1-2 | 0 | |
2.0.1-1E | 0 | |
2.0.1-1D | 0 | |
2.0.1-1C | 0 | |
2.0.1-1B | 1 | |
2.0.1-1 | 0 |
Package Sidebar
Install
npm i qz-tray
Repository
Homepage
Weekly Downloads
29,572
Version
2.2.4
License
LGPL-2.1
Unpacked Size
143 kB
Total Files
3