tmt88v-print-py
Print images to Epson TM-T88V thermal printer (80 mm) via ESC/POS. Sends data directly to the device (e.g. /dev/usb/lp2), no CUPS/lp.
- Resolution: 512 dots (72 mm printable width), configurable.
- Resize:
width,fit(inside | fill | stretch), optionalheight. - Binarization: threshold (default) or dither:
none,floyd-steinberg,ordered,atkinson. - Chunked printing for tall images (default 400 px strips).
Install
pip install tmt88v-print-py
CLI
# Print to default device (/dev/usb/lp2)
tmt88v-print-py image.png
# Custom device
tmt88v-print-py image.png --device /dev/usb/lp0
# Save ESC/POS to file
tmt88v-print-py image.png --output out.bin
# Width 384 (58 mm), Floyd–Steinberg dither
tmt88v-print-py photo.jpg --width 384 --dither floyd-steinberg
# Options: --chunk, --width, --fit, --dither, --threshold
Use sudo if needed: sudo tmt88v-print-py image.png
Local testing (no printer)
Generate a sample image and write ESC/POS to a file:
pip install -e .
python examples/generate_sample.py
tmt88v-print-py examples/sample.png --output examples/out.bin
See examples/README.md for more options and API usage.
API
from tmt88v_print import image_to_escpos, print_image
# Get ESC/POS bytes
data = image_to_escpos("image.png", chunk_height=400, width=512, dither="none")
with open("/dev/usb/lp2", "wb") as f:
f.write(data)
# Or print directly
print_image("image.png", device="/dev/usb/lp2", chunk_height=400)
Author
Pietro Leoni – GitHub · pietro.leoni@gmail.com
License
MIT – see LICENSE.
Metadata
Release files for tmt88v-print-py 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tmt88v_print_py-1.0.0.tar.gz | 6.7 kB | Without provenance | Details for tmt88v_print_py-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tmt88v_print_py-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for tmt88v_print_py-1.0.0-py3-none-any.whl |
Total release size: 14.8 kB
Release files / tmt88v_print_py-1.0.0.tar.gz
| Download URL | tmt88v_print_py-1.0.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94b9d6020913353af53e9ce6bf2802cbec1c5c650595cc15a7b33666e0a85828
|
|
BLAKE2b-256 checksum How to use checksums |
d601417a5a0806c76572cf5b8d5abae87f3c207edf27b5730f01c20da4391f09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Release files / tmt88v_print_py-1.0.0-py3-none-any.whl
| Download URL | tmt88v_print_py-1.0.0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f86bfed5bfcbf443bb6ddd1f6534e043c88d55c1715d2bcd966e87d7d8972207
|
|
BLAKE2b-256 checksum How to use checksums |
ede29079c81a8d3b7697aac0a4f090436138c4928e6c448c01e386c89c6290a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.0
|
Security for tmt88v-print-py 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.