Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/charliegerard/escposencoder.js
Browser version of EscPosEncoder to send commands to a receipt printer 🖨️
https://github.com/charliegerard/escposencoder.js
escpos escpos-printer iot javascript webusb
Last synced: 1 day ago
JSON representation
Browser version of EscPosEncoder to send commands to a receipt printer 🖨️
- Host: GitHub
- URL: https://github.com/charliegerard/escposencoder.js
- Owner: charliegerard
- License: mit
- Created: 2023-03-10T23:15:43.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-03-22T20:54:40.000Z (over 1 year ago)
- Last Synced: 2024-04-14T04:35:30.450Z (7 months ago)
- Topics: escpos, escpos-printer, iot, javascript, webusb
- Language: JavaScript
- Homepage:
- Size: 117 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# EscPosEncoder.js
Browser-based version of the awesome Node.js module [EscPosEncoder](https://github.com/NielsLeenheer/EscPosEncoder) by [@NielsLeenheer](https://github.com/NielsLeenheer)
## Installation
```js
import EscPosEncoder from "https://unpkg.com/[email protected]/dist/module.js";
```## Usage
You should be able to use it the same way as is described in the [original module](https://github.com/NielsLeenheer/EscPosEncoder)
Example:
```js
import EscPosEncoder from "./escposencoder.js";const posEncoder = new EscPosEncoder();
const encodedImage = posEncoder
.initialize()
.newline()
.text("HELLO WORLD")
.encode();
```An example working with [Adafruit's Tiny Thermal printer](https://www.adafruit.com/product/2751#:~:text=Tiny%20Thermal%20Receipt%20Printer%20%2D%20TTL,fun%20DIY%20electronics%20and%20kits) can be found in the [example](./example) folder.