Axiohm A758 helper library for Python
Jacek Kowalski
2016-05-03 645ea69c369785e5df4131866d72b09c200c37ba
commit | author | age
645ea6 1 #!/usr/bin/env python
JK 2 # -*- encoding: utf-8 -*-
3
4 from axiohm import Axiohm
5 import sys
6
7 from PIL import Image
8
9 printer = Axiohm(port = '/dev/ttyS0', baudrate = 19200, xonxoff = True)
10 printer.reset()
11 printer.selectReceipt()
12
13 image = Image.open('test_image.png')
14 printer.printImage(image, printer.IMAGE_MODE_24DOT_DOUBLE)