2.0.7 • Published 6 years ago

@fluidnotions/escpos-print-extended v2.0.7

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

ESC/POS library

Versions

  • clone of escpos-print-extended which was a clone of escpos-print
  • updated deps to work with node v12.6

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 '@fluidnotions/escpos-print-extended/Printer'
import { Font, Justification, TextMode } from '@fluidnotions/escpos-print-extended/Commands'
import { Network } from '@fluidnotions/escpos-print-extended/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.7

6 years ago

2.0.1

6 years ago