qz-tray
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/qz-tray package

2.2.3 • Public • Published
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);
});

Package Sidebar

Install

npm i qz-tray

Weekly Downloads

19,321

Version

2.2.3

License

LGPL-2.1

Unpacked Size

141 kB

Total Files

3

Last publish

Collaborators

  • qzind