Printer not parsing ESCPOS from python correctly
See original GitHub issueI have:
- searched open and closed issues for duplicates
Bug description
My printer doesn’t seem to be accepting the ESCPOS commands being sent by python-escpos in the correct manner. Don’t get me wrong, it seems to be having a valiant go at it, but it’s not making much headway. For instance, Epson.barcode('1324354657687','EAN13',64,2,'','')
prints aw1324354657687
on the printer, and any of the .set()
commands simply make the text tiny and occasionally miss some letters. It’s a bit of a weird one - any ideas?
Device info
Printer: Generic 58mm Thermal Reciept Printer POS-5890K set up on /dev/usb/lpt0
python-escpos version: 2.1.3
python version: 3.4.2
operating system: Raspbian Jessie Lite
Issue Analytics
- State:
- Created 7 years ago
- Comments:15 (14 by maintainers)
Top Results From Across the Web
python-escpos QS Printer not printing - Stack Overflow
My PC is running on Windows 10, have Python 2.7 and python-escpos installed. I tried this but it's not working. >>>from escpos.printer import ......
Read more >Printing with Python and Epson POS printer. | by Kakar Nyori
I am trying to print using a python package on windows, called python-escpos. This library works fine in both mac and Unix by...
Read more >python-escpos Documentation - Read the Docs
Python ESC/POS is a library which lets the user have access to all those printers handled by ESC/POS commands, as.
Read more >TODO — python-escpos 2.1.1 documentation
python -escpos is the initial idea, from here we can start to build a robust library to get most of the ESC/POS printers...
Read more >Writing a printer 'driver' for a thermal printer - Lucas Vogel
So of course there was no driver for that. My next thought was to use an awesome library called python-escpos written in python....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
p.control("CR")
doesn’t work either - for instance, the scriptactually outputted
ello,tis
exactly like that (no carriage return whatsoever).And now my desk is full of tiny sheets of thermal paper!
for python 3.7+ and 3nStar RPT008 THERMAL PRINTER:
you must add usb library:
from escpos.printer import Usb
and change the line 38 for this:
p = Usb(0x1fc9, 0x2016, 0)
“Vendor ID” and “Product ID”, you found with: >lsusband 16 for this:
leftCols = leftCols / 2 - rightCols / 2
leftCols = int(leftCols)