GithubHelp home page GithubHelp logo

py-thermal-printer's People

Contributors

jharlap avatar luopio avatar omundy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

py-thermal-printer's Issues

Bitmap print function cutting off top half of images

Hi,

I'm generating qrcodes to be used with the thermal printer using the qrcode library (https://pypi.python.org/pypi/qrcode). The codes generate fine (I can see them on the file system and scan them from my phone) however when I try and print them using the barcode call, the first couple of rows of the image get chopped off giving me an invalid barcode.

The code is as follows:

#!/usr/bin/env python
import printer
import qrcode
from qrcode.image.pure import PymagingImage

p = printer.ThermalPrinter(serialport="/dev/ttyAMA0")
qr = qrcode.QRCode(
      version=None,
      error_correction=qrcode.constants.ERROR_CORRECT_M
      )

qr.add_data('TEST')
qr.make(fit=True)

im = qr.make_image()
w, h = im.size
data = list(im.getdata())
p.linefeed()
p.linefeed()
p.print_text("TEST")
p.linefeed()
p.linefeed()
p.print_bitmap(data,w,h,True)
p.linefeed()
p.linefeed()
p.linefeed()
p.linefeed()

If anyone can shed light on why I'm missing some of the QRcode that would be great!

Cheers,

Matt

P.S. FWIW, Text prints fine :)

compatibility with 2016-05-10-raspbian Jessie

Hi,

This is not working with the new raspbian version (2016-05-10).
I had to install back the 2016-03-18-raspbian version to be able to print the example.

I'm using a raspberry pi v2.

Regards,
Renaud.

cut paper

I believe this printer is capable of cutting paper, but the function is not implemented... have you ever try that?

Contrast of print_output images

I am using your library to print photos but the print-output is somehow disappointing because the contrast is too high. I put an example below.
print-output
I tried to tune the black_threshold and alpha_threshold but it did not quite resolve my problem. What I would like is to get the same rendering as with the LittlePrinter project http://littleprinter.com/ (see the picture printed at the end of the video).
I will investigate the problem, but if you have ideas on where to start, I would appreciate.

support for ubuntu or another x86 linux?

The readme file doesn't say whether this will work okay with ubuntu or another x86 linux. Is there any reason why it would not work if you have an available serial port? I briefly looked through the code and didn't see any obvious reasons. Are there? I would just like to know before I go and purchase an appropriate printer.

Encoding

hey, it's possible to set different encoding? My printer is printing chinese chars by default.

thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.