BoboTiG / thermalprinter

Python module to manage the DP-EH600 thermal printer.
https://pypi.org/project/thermalprinter/
MIT License
33 stars 8 forks source link

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

Open pawelmalak opened 4 years ago

pawelmalak commented 4 years ago

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?

Upvote & Fund

Fund with Polar

zbyrek commented 3 years ago

I have same issue, did you resolve that?

pawelmalak commented 3 years ago

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 commented 3 years ago

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 commented 1 year ago

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

archfurry commented 7 months ago

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.