Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nielsleenheer/receiptprinterencoder
Create a set of commands that can be send to any receipt printer that supports ESC/POS, StarLine or StarPRNT
https://github.com/nielsleenheer/receiptprinterencoder
escpos pos printer receipt starline starprnt
Last synced: 7 days ago
JSON representation
Create a set of commands that can be send to any receipt printer that supports ESC/POS, StarLine or StarPRNT
- Host: GitHub
- URL: https://github.com/nielsleenheer/receiptprinterencoder
- Owner: NielsLeenheer
- License: mit
- Created: 2021-07-22T13:27:45.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T16:47:26.000Z (3 months ago)
- Last Synced: 2024-10-22T22:05:26.554Z (2 months ago)
- Topics: escpos, pos, printer, receipt, starline, starprnt
- Language: JavaScript
- Homepage:
- Size: 426 KB
- Stars: 168
- Watchers: 3
- Forks: 15
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ReceiptPrinterEncoder
**Formally known as EscPosEncoder, StarPrntEncoder and ThermalPrinterEncoder**
Create a set of commands that can be send to any receipt printer that supports ESC/POS, StarLine or StarPRNT.
- [About ReceiptPrinterEncoder](README.md)
- [Usage and installation](documentation/usage.md)
- [Configuration options](documentation/configuration.md)
- [Handling text](documentation/text.md)
- [Commands for creating receipts](documentation/commands.md)
- [Printing receipts](documentation/printing.md)
- [Changes from version 2 to version 3](documentation/changes.md)
[![npm](https://img.shields.io/npm/v/@point-of-sale/receipt-printer-encoder)](https://www.npmjs.com/@point-of-sale/receipt-printer-encoder)
![GitHub License](https://img.shields.io/github/license/NielsLeenheer/ReceiptPrinterEncoder)> This library is part of [@point-of-sale](https://point-of-sale.dev), a collection of libraries for interfacing browsers and Node with Point of Sale devices such as receipt printers, barcode scanners and customer facing displays.
## About ReceiptPrinterEncoder
This library allows you to run commands to add content, such as text, images and barcodes to a receipt and encode that content to ESC/POS, StarLine and StarPRNT commands.
```js
let encoder = new ReceiptPrinterEncoder();let result = encoder
.line('The is the first line')
.line('And this is the second')
.encode()/* To do: send result to the printer */
```Once you have the encoded commands you need a method to send those commands to the receipt printer - to actually print the receipt. And for that we have a list of sister libraries.
-----
This library has been created by Niels Leenheer under the [MIT license](LICENSE). Feel free to use it in your products. The development of this library is sponsored by Salonhub.