eymlo / python-escpos

Automatically exported from code.google.com/p/python-escpos
GNU General Public License v3.0
1 stars 0 forks source link

Image Printing not working correctly #7

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When trying to print an Image, Barcode or QR-Code, the Printer only prints a 
lot of Characters.

Printer Model: Epson TM-T88III

I'm on a Raspberry Pi - Model B
OS: Debian GNU/Linux 7.0 (wheezy) (Raspbian “wheezy”)

Python:
- Python 2.7.3
- Python Imaging 1.1.7

Original issue reported on code.google.com by ynr...@gmail.com on 8 Apr 2013 at 7:32

GoogleCodeExporter commented 9 years ago
I too am having this problem, with an Epson TM-T20. Is there any further 
information? Does something need to be reconfigured on the printer?

Original comment by murray.m...@gmail.com on 16 May 2013 at 9:33

GoogleCodeExporter commented 9 years ago
I too am having this problem, with an Epson TM-T20.
Only random characters are printed when I try to print an image or a QRcode.
Can someone please point me to a website which gives examples of python scripts 
for using python-escpos?

Original comment by mrianwal...@gmail.com on 29 May 2013 at 8:43

GoogleCodeExporter commented 9 years ago
Can all of you confirm you are satisfying all the dependencies please?

http://code.google.com/p/python-escpos/wiki/Dependencies

Thank you,

Original comment by manpaz on 30 May 2013 at 4:00

GoogleCodeExporter commented 9 years ago
I'm having this problem too.
Random characters with image and qr.

Printer: Epson TM-H6000 (Serial)

System: OpenSuse 12.1(x86_64)

Python: 2.7.2
Python-imaging: 1.1.7
Python-pyserial: 2.5.2
qrcode: 2.7

Original comment by cafeteri...@gmail.com on 16 Jun 2013 at 10:49

GoogleCodeExporter commented 9 years ago
I have verified that I meed the prerequisites.

The problem seems to be related to printing text before the image.

This works (albeit with some banding in the image):
from escpos import *
Epson = printer.Usb(0x04b8, 0x0202)
Epson.image("logo.gif")
Epson.cut()

This prints "Hello World" followed by a lot of characters (not the image):
from escpos import *
Epson = printer.Usb(0x04b8, 0x0202)
Epson.text("Hello World")
Epson.image("logo.gif")
Epson.cut()

Original comment by murray.m...@gmail.com on 25 Jun 2013 at 6:39

GoogleCodeExporter commented 9 years ago
It looks like the catch, at least in my case, is to make sure to put a newline 
between the text and the image:

Epson.text("Hello World\n")
Epson.image("logo.gif")

Does print the text, followed by the image, as expected.

Original comment by murray.m...@gmail.com on 25 Jun 2013 at 6:53

GoogleCodeExporter commented 9 years ago
Wow! Thanks for that hint :-) It's exactly as you said: It works perfectly with 
"\n"!

cheers!

Original comment by ynr...@gmail.com on 26 Jun 2013 at 7:19

GoogleCodeExporter commented 9 years ago
Yes!!

Epson.text("Some text\n") or just insert an
Epson.text("\n")

after printing a text,
and image, qr and barcode printing started work on my TM-H6000 serial printer.

Thanks a lot for the hint.

Original comment by cafeteri...@gmail.com on 10 Sep 2013 at 6:44

GoogleCodeExporter commented 9 years ago
This issue has been solved by murray.melvin.

The wiki entry has been updated accordingly to reflect the newline character 
'\n' at the end of the text.

Thank you very much murray.melvin for your contribution to the project.

Original comment by manpaz on 11 Sep 2013 at 10:41