Skip to content
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

Letter 'P' being printed every time before anything else #15

Open
pawelmalak opened this issue Sep 5, 2020 · 5 comments
Open

Letter 'P' being printed every time before anything else #15

pawelmalak opened this issue Sep 5, 2020 · 5 comments

Comments

@pawelmalak
Copy link

As in the title, every time I'm trying to print something, a new line with the letter 'P' is added.

I tried the sample code from README > Usage and got this as a result:

IMG_2207

And later I tried to print only new lines with this code...

from PIL import Image
from thermalprinter import *

with ThermalPrinter(port='/dev/serial0',baudrate=9600) as printer:
    printer.feed(5)

... with this as a result:

IMG_2206

Any idea what might be causing it?

@zbyrek
Copy link

zbyrek commented Mar 9, 2021

I have same issue, did you resolve that?

@pawelmalak
Copy link
Author

Unfortunately, I did not. I tried different configurations and sample codes but I couldn't get around it and since it only was my side project I just gave up on it. Are you using it with Raspberry Pi by any chance?

@zbyrek
Copy link

zbyrek commented Mar 9, 2021

All right, the issue is in init code, here's the fix in file thermalprinter.py:

-        # Printer settings
-        self.send_command(Command.ESC, 55, self.most_heated_point,
-                          self.heat_time, self.heat_interval)

It seems that printer which you (and I) have don't support these commands.

@BoboTiG
Copy link
Owner

BoboTiG commented Jan 12, 2023

@pawelmalak, and @zbyrek, what is your printer model?

@archfurry
Copy link

Dear @BoboTiG ,
I experience that same problem with QR701 priter bought on AliExpress
The fix from @zbyrek works fine, no other side effects observed, although no characters other than ASCII are used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants