htmltoescpos
v1.1.3
Published
This module uses puppeteer to render html code in background, then allow it to be printed as an image using ESCPOS (POS printers).
Downloads
18
Readme
HTMLtoESCPOS
This module renders html and allow it to be printed with an POS printer.
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();