0.9.22 • Published 2 months ago
@baemingo/epson-printer-sdk v0.9.22
@baemingo/epson-printer-sdk
A modern and simple "connect-less" integration against EPSON printers.
Printer Prerequisites
- The printer needs to support Ethernet connections
- The printer needs to run on at least v2.x
- The printer needs to have the "epos print" setting turned on
Install
Using npm:
npm install --save @baemingo/epson-printer-sdk
or using yarn:
yarn add @baemingo/epson-printer-sdk
Usage
import EpsonPrinter, { EpsonPrint, Epson } from '@baemingo/epson-printer-sdk';
// Create a printer instance
const printer = new EpsonPrinter('192.168.0.1');
// Build up a print object
const print = new EpsonPrint();
// Add some text
print.addText('Hello, world!');
// Add a QR code
print.addSymbol('1234', Epson.Symbol.QRCODE_MODEL_1, 1, 50, 50, 2);
// Cut the paper
print.addCut(EpsonPrint.CUT_FEED);
// Send the print object to the printer
try {
await printer.send(print);
// Success
} catch (e) {
// Print failed
console.error(e.message);
}
Connections & parallel printers
This implementation uses one-off http requests and does not set up a permanent connection. This means you can have a many-to-many setup with printers and clients and it will work just fine (unlike with the native SDKs).
0.9.22
2 months ago
0.9.21
2 months ago
0.9.13
3 months ago
0.9.14
3 months ago
0.9.15
3 months ago
0.9.20
3 months ago
0.9.16
3 months ago
0.9.17
3 months ago
0.9.18
3 months ago
0.9.19
3 months ago
0.9.12
1 year ago
0.9.11
1 year ago
0.9.10
1 year ago
0.9.9
1 year ago
0.9.8
1 year ago
0.9.7
1 year ago
0.9.5
1 year ago
0.9.3
1 year ago
0.9.2
1 year ago