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)
|
|