Skip to content

esc tsc print for nodejs,支持ESC/TSC指令打印文字和图片

Notifications You must be signed in to change notification settings

keyiis/pos-print

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

esc tsc print for nodejs,支持ESC/TSC指令打印文字和图片

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published