pos-print
esc tsc print for nodejs
This module dependencies node-printer
How to use
- javascript
const print = require('pos-print');
- typescript
import * as print from 'pos-print'
API
-
getPrinters()
Get all installed printers -
printText(printerName:string, text:string)
Return Promise
Print text,print.printText('epson-58','hello!')
-
printRaw(printerName:string, data:any)
Return Promise
Print cmd,print.printRaw('epson-58','\x1b\x40')
-
printImageByTSC(options)
options{ printer: string; url: string; pageWidth: number; pageHeight: number; gap: number; copy: number; }
Return Promise
Print image by TSC -
printImageByESC(options)
options{ printer: string; url: string; maxWidth: number; }
Return Promise
Print image by ESC/POS