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