-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for StarPRNT (e.g. mc-Print 2/3)? #489
Comments
Try sending binary data to the printer instead of cut command; it's in the docs, but you may have to find which binary command corresponds to what you are looking for. Alternatively, try using the StarTSPImage library; I am not sure if the model is applicable, but it worked on my TSP100/TSP143 printers. image = Image.new('RGB', (500, 500), color='White') raster = StarTSPImage.imageFileToRaster('a.png', cut=True) host = "192.168.12.241" mysocket.connect((host, port)) mysocket.close()time.sleep(2)` |
For those wondering on what raw command it is to cut, you can do: |
I have:
Bug description
When using a Star mcPrint 2 or 3, the printer won't cut, but instead print a
V
. That is because as laid down in the StarPRNT spec these printers use<ESC> d x
for cutting instead of<GS> V x
(see page 45 of the linked document). They also use<ESC> <GS> t x
for codepage selection (instead of<ESC> t x
).Unfortunately both of those commands are hardcoded in python-escpos and there is no way to override that via capabilities.
I'm principally interested to work on this, but wanted to ask first if
a.) you consider this to be inside the scope of this project and
b.) if so, what would be the best way to implement it?
Basically one would need to override
_CUT_PAPER
andCODEPAGE_CHANGE
, therefore it would be necessary to mark the printer (possibly in the profile) to support StarPRNT instead of regular ESCPOS. There is astarCommands
flag in the profiles but it doesn't seem to be used anywhere?Device info
Printer: Star mcPrint 3
python-escpos version: HEAD
python version: 3.8
operating system: Ubuntu
The text was updated successfully, but these errors were encountered: