Giter VIP home page Giter VIP logo

python-thermal-printer's Introduction

Python-Thermal-Printer Module

Python3 port of the original Adafruit Python-Thermal-Printer library.

Getting Started

Install Raspbian Buster and Wire the printer according to this. I powered the printer with the GPIO pins as well.

Run a test to see if the printer is working by punching in these commands into the terminal.

stty -F /dev/serial0 19200
echo -e "This is a test.\\n\\n\\n" > /dev/serial0

Installing

Update the system and install prequisities.

sudo apt-get update
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python3-serial python-pil python-unidecode

Install the printer driver. Don't worry about the warnings that g++ gives.

git clone https://github.com/adafruit/zj-58
cd zj-58
make
sudo ./install

Make the printer the default printer. This is useful if you are going to be doing other things with it.

sudo lpadmin -p ZJ-58 -E -v serial:/dev/serial0?baud=19200 -m zjiang/ZJ-58.ppd
sudo lpoptions -d ZJ-58

Restart the system. Clone this repository and try to run printertest.py.

git clone https://github.com/galacticfan/Python-Thermal-Printer/
cd Python-Thermal-Printer
python3 printertest.py

Let me know if you have any issues.

python-thermal-printer's People

Contributors

paintyourdragon avatar jmzjmzjmz avatar ladyada avatar nathanllee1 avatar bsmithyman avatar masatomukoda avatar gregorspamsa avatar kitlaan avatar sauntheninja2 avatar

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.