pip3 install pyserial python-escpos pymupdfYou will need to configure your receipt printer in each script seperately as of now. This offers the advantage that the scripts can also be used individually. I might change this in the future.
The code snippet you'll need to change looks like this:
p = Serial(
devfile='/dev/ttyUSB0',
baudrate=19200,
bytesize=8,
parity='N',
stopbits=1,
timeout=1.00,
dsrdtr=True,
profile="TM-T88III"
)The values are pretty self-explanatory. If you're unsure, press and hold the "feed"-button while plugging in your Epson receipt printer. It will print out the information.
At the moment I don't have access to LPT-, USB- or Ethernet-printers, so take a look at the python-escpos documentation if you want to use one of those.
This is an overview of all scripts included in this repository, along with a brief guide on how to use them. You can run all scripts without parameters to read their usage.
Prints plain text
python3 print_text.py "your_text_here"Prints an image at the largest size possible
python3 print_image.py /path/to/image.pngPrints singular DIN-A4 labels from Deutsche Post with exact scaling
python3 dp_label.py /path/to/label.pdf