Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dacduong/escpos-printer-simulator
ESC/POS Printer simulator
https://github.com/dacduong/escpos-printer-simulator
Last synced: 3 months ago
JSON representation
ESC/POS Printer simulator
- Host: GitHub
- URL: https://github.com/dacduong/escpos-printer-simulator
- Owner: dacduong
- License: mit
- Created: 2017-04-25T22:37:06.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-06-13T03:00:27.000Z (over 5 years ago)
- Last Synced: 2024-02-17T10:38:43.227Z (9 months ago)
- Language: Java
- Size: 7.21 MB
- Stars: 90
- Watchers: 7
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# escpos-printer-simulator
ESC/POS Printer simulator written in Java.
This provide Swing GUI to display receipts and also write content to a file - access through web url.
The idea comes from JavaPos printer simulator and from [escpos-tools](https://github.com/receipt-print-hq/escpos-tools), a PHP library.
Web access:
## Usage
```
java -jar ESCPosPrinterSimulator.jar [port] [filepath] [filesize]Example:
java -jar ESCPosPrinterSimulator.jar
java -jar ESCPosPrinterSimulator.jar 9100
java -jar ESCPosPrinterSimulator.jar 9100 receipts.txt 10run as linux / ubuntu background:
java -jar ESCPosPrinterSimulator.jar 9100 receipts.txt 200 & exit
```
Arguments:
- port: optional - default 9100.
- filepath: path to the written receipt - if available, program will run without GUI.
- filesize: in KB - default 200. If reach the size, file will be deleted then recreated.Deploy on linux Apache & PHP
```
java -jar ESCPosPrinterSimulator.jar 9100 /var/www/html/escpos-printer/tmp/9100.txt & exitaccess through url:
http://{ip}/escpos-printer/printer-page.php?files=9100.txt
```