htmltoescpos
TypeScript icon, indicating that this package has built-in type declarations

1.1.3 • Public • Published

HTMLtoESCPOS

This module renders html and allow it to be printed with an POS printer.

results

How it works:

This module uses Puppeteer to render html in a chromium browser in the background. Then a screenshot is taken and printed as a png image using ESCPOS.

example:

    import { closeBrowser, CreateNetworkPrinter } from "htmltoescpos";

    const test = async () => {
        const printer = CreateNetworkPrinter("192.168.0.151");
        await printer.printUrl('https://www.google.com', {
            beep: {count: 2, time: 5}
        });
        await closeBrowser();
    }

    test();

Package Sidebar

Install

npm i htmltoescpos

Weekly Downloads

2

Version

1.1.3

License

ISC

Unpacked Size

41.8 kB

Total Files

12

Last publish

Collaborators

  • fanghanhu