qzprinty

1.0.15 • Public • Published

Usage

Pass an HTML to the print function

let qzp = new qzPrinty();
qzp.print(htmlToPrint);

By default, the printer name in use is "Zebra-Technologies-ZTC-ZT230-200dpi-ZP" You can specify a printer name in options like so:

let qzp = new qzPrinty({ printer: "My printer name" });

You can also pass printer settings, for example:

let qzp = new qzPrinty({ 
    printer: 'qr-printer', 
    settings: { 
        units: 'in', 
        size: { 
            width: 4, 
            height: 6 
        }, 
        rasterize: false 
    } 
});

You can find all settings on the qz.io config page: https://qz.io/api/qz.configs

You can also print pdf files as such:

qzp.print(pathToPdf/URL, 'pdf');

To print multiple times, pass the values in an array, example:

qzp.print([html1, html2, html3]);

/qzprinty/

    Package Sidebar

    Install

    npm i qzprinty

    Weekly Downloads

    72

    Version

    1.0.15

    License

    ISC

    Unpacked Size

    267 kB

    Total Files

    8

    Last publish

    Collaborators

    • namshi
    • ammar.rayess