-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more documentation #22
Comments
Thank you for using receiptline / receiptio. Yesterday, we had our first meeting of the year and discussed about this issue. 1. receiptline (1) Convert markdown to printer commands and write to a binary file const fs = require('fs');
const receiptline = require('receiptline');
const text = fs.readFileSync('receipt.txt').toString().replace(/^\ufeff/, '');
const data = receiptline.transform(text, { command: 'escpos', cpl: 42, spacing: true });
fs.writeFileSync('receipt.prn', data, 'binary'); If the printer is printer class: (2) Print with lpr $ lpr -P TM-T88V-JPN -o raw receipt.prn If the printer is a vendor class: (2) Change permissons $ sudo chmod 666 /dev/usb/lp0 (3) Write directly to the device file $ cat receipt.prn > /dev/usb/lp0 or write directly in Node.js //fs.writeFileSync('receipt.prn', data, 'binary');
fs.writeFileSync('/dev/usb/lp0', data, 'binary'); 2. receiptio receiptio does not currently support So we need to convert the device file read/write to a duplex stream as a socket. Thank you. |
Hello! We have just released ReceiptIO V1.1.0. $ receiptio -d /dev/usb/lp0 -p escpos -c 42 -l en example.txt Thank you. |
For those who don't understand NODE.JS, they don't know how your code works at all. |
Dear receiptline / receiptio:
This project looks great. But as a non-node.js developer, it is difficult to get things running. A step-by-step example would be great.
I have a Epson TM-T88IV and a Star TSP100(USB version, not network version) here. I try to print on it with receiptline, but no success. I am using Ubuntu 20.04 on x86-64, the printers are on /dev/lp0 and /dev/lp1.
Could you guide me, how I can print on the Epson or Star with receiptline or receiptio? I have the designer running on localhost:8080, but I dont know where to enter the /dev/lp0 or lp1. Or even better, printing from the command line.
Thanks and Merry Christmas,
The text was updated successfully, but these errors were encountered: