py-thermal-printer icon indicating copy to clipboard operation
py-thermal-printer copied to clipboard

After every initialization a cyrillic small letter 'ya'

Open ascherl opened this issue 11 years ago • 4 comments

Sometimes it prints the "я" before, sometimes right on the same line.

image

Do you have any idea how to fix this? Printer is version 2.2 2010-01-08

ascherl avatar Apr 21 '14 17:04 ascherl

Thanks for the report! It might be one of the init-settings or then just need to clear the serial buffer. Can you post a snippet of code that reproduces the problem and I can see if I get the same results?

For a quick fix you can try commenting out rest of init from here https://github.com/luopio/py-thermal-printer/blob/master/printer.py#L85

IIRC those lines are optional. Default settings will be used.

luopio avatar Apr 22 '14 06:04 luopio

Commenting did not do the trick.

This happens after every initialisation. Even when i call

python printer.py

to do a test.

Minimal example: rudi@raspberrypi ~/Projects/py-thermal-printer $ python Python 2.7.3 (default, Mar 18 2014, 05:13:23) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import printer p = printer.ThermalPrinter(serialport="/dev/ttyAMA0") p.linefeed()

ascherl avatar Apr 23 '14 09:04 ascherl

I haven't been able to reproduce this using a 2013 version of Raspbian running on Raspberry Pi with en_us UTF-8 locale and Python 2.7. Any thing peculiar about your setup, like locale? Any components you connect through to the printer or just pin 8 and pin6 on Raspberry Pi (Board type pin counting)? With external power coming from another plug?

luopio avatar Apr 30 '14 12:04 luopio

Hi there. I'm having a similar issue but with more characters every time I test the printer.py script. Did you ever fix this ascherl?

rachaelGB avatar Aug 19 '15 17:08 rachaelGB