Python driver for IBM/Toshiba 4610 SureMark POS printers with USB interface
Project description
IBM/Toshiba 4610 SureMark
Python library for IBM / Toshiba 4610 SureMark POS thermal receipt printers, communicating over USB.
Hardware
| Model | Station(s) | Tested | Notes |
|---|---|---|---|
| 4610-1NR | Receipt (thermal roll) | + | Common receipt-only variant |
| 4610-TI3 | Receipt + Slip/DI + Check scanner | - | Full-featured model |
| Other | Varies | - | Use IBM4610 base class |
USB identifiers: VID=0x04B3, PID=0x4535, Interface 1.
Installation
pip install py-ibm-4610
pyusb may require libusb to be installed on the system. This needs to be verified.
Also udev features must listed and verified.
Quick start
from py_ibm_4610 import IBM4610
# Context manager opens and closes the USB connection automatically
with IBM4610() as p:
p.select_station(STATION_RECEIPT)
p.bold(True).text("Hello, World!\n").bold(False)
p.feed(4)
p.cut()
Reference page
There is a ReferencePage() class slop-coded recently. It needs to be refactored.
Available sections:
TEXT_FORMATTING, FONT_SCALING, FONT_FACES, ALIGNMENT, FONT_COLOR,
ROTATION, LINE_SPACING, FEED, TAB_STOPS, MARGINS, DOT_SPACING,
CHAR_SETS, PRINT_QUALITY, BARCODES, BITMAP, PAGE_MODE,
BUFFER_CONTROL, STATUS, LINE_COUNT, STATUS_SENT, ERROR_RECOVERY,
FEED_BUTTON, CASH_DRAWER, BEEPER, MCT, STATISTICS.
API overview
All command methods return self for chaining. Data is buffered until
flush() is called (or cut(), which flushes automatically).
p.select_station(STATION_RECEIPT)
p.bold(True).text("Header\n").bold(False)
p.alignment(ALIGN_CENTER).text("Centered\n").alignment(ALIGN_LEFT)
p.barcode(BC_EAN13, "5901234123457", height=60)
p.feed(5)
p.cut()
# Read printer statistics over USB
resp = p.read_stat("PaperCutCount")
Buffered workflow
p.select_station(STATION_RECEIPT)
p.text("Line 1\n")
p.text("Line 2\n")
total_bytes = p.flush() # sends everything at once
High-level helper
p.print_receipt(
lines=["Item A $1.00", "Item B $2.50", "Total $3.50"],
feed=5,
cut=True,
)
Building from source
make build # produces dist/py_ibm_4610-<version>-py3-none-any.whl
make install # installs the wheel for the current user
make clean # removes the built wheel
Notes
Reverse-engineered from the IBM JavaPOS driver (posj.jar) sourced out of a random place most probably.
License
GNU General Public License v3.0
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_ibm_4610-1.0.0.tar.gz.
File metadata
- Download URL: py_ibm_4610-1.0.0.tar.gz
- Upload date:
- Size: 68.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a91625f3b9fd0ca57cb585f9c9d806bd31b458bb4c4dd764d46189ce2df50612
|
|
| MD5 |
e0e4eeedf68c9393829c601b0b74aa67
|
|
| BLAKE2b-256 |
95ea0851ad2a5024e41f5424e5aa6c5f46429f81fc3da84ddd3d4dc07371a8dd
|
Provenance
The following attestation bundles were made for py_ibm_4610-1.0.0.tar.gz:
Publisher:
release.yml on printer-stream/py-ibm-4610
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_ibm_4610-1.0.0.tar.gz -
Subject digest:
a91625f3b9fd0ca57cb585f9c9d806bd31b458bb4c4dd764d46189ce2df50612 - Sigstore transparency entry: 1449442770
- Sigstore integration time:
-
Permalink:
printer-stream/py-ibm-4610@5c9f0db418d3127eb82de44aaae9bcf5fef7b15c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/printer-stream
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5c9f0db418d3127eb82de44aaae9bcf5fef7b15c -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_ibm_4610-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py_ibm_4610-1.0.0-py3-none-any.whl
- Upload date:
- Size: 53.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c9a76a588420f1974df8a80386cc4a54bdddb5106e01ae1a5a2bb3412fdbf67
|
|
| MD5 |
a95a4284eb59a2498845df043c45b108
|
|
| BLAKE2b-256 |
c79eb0844224a3782d5f02c3f6c7938690324b9ff1ecd5da746a93c2ef0297c1
|
Provenance
The following attestation bundles were made for py_ibm_4610-1.0.0-py3-none-any.whl:
Publisher:
release.yml on printer-stream/py-ibm-4610
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_ibm_4610-1.0.0-py3-none-any.whl -
Subject digest:
6c9a76a588420f1974df8a80386cc4a54bdddb5106e01ae1a5a2bb3412fdbf67 - Sigstore transparency entry: 1449442775
- Sigstore integration time:
-
Permalink:
printer-stream/py-ibm-4610@5c9f0db418d3127eb82de44aaae9bcf5fef7b15c -
Branch / Tag:
refs/heads/master - Owner: https://github.com/printer-stream
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5c9f0db418d3127eb82de44aaae9bcf5fef7b15c -
Trigger Event:
push
-
Statement type: