1.0.1 • Published 3 years ago

escpos-roach v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

escpos-roach

To be used with Roach escpos server.

Printer(address)

const Printer = require('escpos-roach');
const printer = new Printer('http://localhost:3000'); // or whatever your Roach server is on.

printer.font('a')
	.align('ct')
	.style('bu')
	.size(0,0)
	.text('The quick brown fox jumps over the lazy dog')
	.table(["One", "Two", "Three"])
	.tableCustom(
		[
		{ text:"Left", align:"LEFT", width:0.33, style: 'B' },
		{ text:"Center", align:"CENTER", width:0.33},
		{ text:"Right", align:"RIGHT", width:0.33 }
		],
		{ encoding: 'cp857', size: [1, 1] } // Optional
	)
	.qrimage('https://github.com/song940/node-escpos').cut().close();
1.0.1

3 years ago

1.0.0

3 years ago