Driver for the DP-EH600 thermal printer (AdaFruit).
Project description
DP-EH600 Thermal Printer
Python module to manage DP-EH600 thermal printers (the one sold by AdaFruit).
- Python 3.7+ and PEP8 compliant;
- this is a clean follow of the technical manual with few helpers;
- and there is a complete, and beautiful, documentation 🙂
- also several useful recipes;
- contributors are welcome, check the developer guide!
Printers
Supported printers:
- DP-EH600
- DP-EH400/1
Installation
python -m pip install -U thermalprinter
Usage
An example is better than a thousand words:
from PIL import Image # Optional, for printing images
from ThermalPrinter import *
with ThermalPrinter(port="/dev/ttyAMA0") as printer:
# Picture
printer.image(Image.open("src/tests/gnu.png"))
# Bar codes
printer.barcode_height(80)
printer.barcode_position(BarCodePosition.BELOW)
printer.barcode_width(3)
printer.barcode("012345678901", BarCode.EAN13)
# Styles
printer.out("Bold", bold=True)
printer.out("Double height", double_height=True)
printer.out("Double width", double_width=True)
printer.out("Inverse", inverse=True)
printer.out("Rotate 90°", rotate=True, codepage=CodePage.ISO_8859_1)
printer.out("Strike", strike=True)
printer.out("Underline", underline=1)
printer.out("Upside down", upside_down=True)
# Chinese (almost all alphabets exist)
printer.out("现代汉语通用字表", chinese=True, chinese_format=Chinese.UTF_8)
# Greek (excepted the ΐ character)
printer.out("Στην υγειά μας!", codepage=CodePage.CP737)
# Other characters
printer.out(b"Cards \xe8 \xe9 \xea \xeb", codepage=CodePage.CP932)
# Accents
printer.out("Voilà !", justify="C", strike=True, underline=2, codepage=CodePage.ISO_8859_1)
# Line feeds
printer.feed(2)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
thermalprinter-0.3.0.tar.gz
(28.0 kB
view details)
Built Distribution
File details
Details for the file thermalprinter-0.3.0.tar.gz
.
File metadata
- Download URL: thermalprinter-0.3.0.tar.gz
- Upload date:
- Size: 28.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2db8c9def9dca8d975f723ab91d498f9072b642c6194ca8ae01748c2cc3e3f77 |
|
MD5 | a68a40bd9c363bb4416d8f4d954184b1 |
|
BLAKE2b-256 | f4fa33c2494a48f8bac693d8159923f78fc965dbc1c61edd921300ccc5d2e3cb |
Provenance
The following attestation bundles were made for thermalprinter-0.3.0.tar.gz
:
Publisher:
release.yml
on BoboTiG/thermalprinter
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
thermalprinter-0.3.0.tar.gz
- Subject digest:
2db8c9def9dca8d975f723ab91d498f9072b642c6194ca8ae01748c2cc3e3f77
- Sigstore transparency entry: 146087872
- Sigstore integration time:
- Predicate type:
File details
Details for the file thermalprinter-0.3.0-py3-none-any.whl
.
File metadata
- Download URL: thermalprinter-0.3.0-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 975c880adf2286c6fa60efe0722e51571f31928799518b7e5a82aecb32aa63e2 |
|
MD5 | 544fee44d5a473fd3aeea98bd72a9eef |
|
BLAKE2b-256 | bd29e0a9c716fd3590b7a0baa8c08c7ac0dd34a6da2ed4f3bbab3e948459c1bd |
Provenance
The following attestation bundles were made for thermalprinter-0.3.0-py3-none-any.whl
:
Publisher:
release.yml
on BoboTiG/thermalprinter
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
thermalprinter-0.3.0-py3-none-any.whl
- Subject digest:
975c880adf2286c6fa60efe0722e51571f31928799518b7e5a82aecb32aa63e2
- Sigstore transparency entry: 146087873
- Sigstore integration time:
- Predicate type: