2.0.0 • Published 6 years ago

escpos-print v2.0.0

Weekly downloads
10
License
MIT
Repository
github
Last release
6 years ago

ESC/POS library

Features:

  • Adapters for Network, Serial, and Console (for debugging)
  • Usual text stuff (Bold, Underline, Justification etc.)
  • PNG images
  • Bar code printing (Regular, QR, PDF417)

Usage example:

import Printer from 'escpos-print/Printer'
import { Font, Justification, TextMode } from 'escpos-print/Commands'
import { Network } from 'escpos-print/Adapters'

const adapter = new Network("192.168.0.102", 9100)
const printer = await new Printer(adapter).open()
                           
printer.setFont(Font.A)
       .setJustification(Justification.Center)
       .setTextMode(TextMode.DualWidthAndHeight)
       .writeLine("This is some large centered text")
       .setTextMode(TextMode.Normal)
       .setJustification(Justification.Left)
       .writeLine("Some normal text")
       .feed(4)
       .close()
       .then(() => console.log("Done printing..."))
2.0.0

6 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago