-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathAppTest.py
More file actions
35 lines (26 loc) · 830 Bytes
/
AppTest.py
File metadata and controls
35 lines (26 loc) · 830 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import datetime
from escposprinter import *
from escposprinter.escpos import EscposIO, Escpos
printerAddress = '192.168.17.189'
printerPort = 9100
string = str("String: " + str(datetime.datetime.now().microsecond))
for iteration in range(10):
with EscposIO(printer.Network(printerAddress, printerPort)) as p:
p.set(font='a', codepage='cp1251', size='normal', align='center', bold=True)
p.writelines('LOGO')
#p.printer.nvRamImage()
#p.printer.image('IMAGE PATH')
p.writelines('')
p.writelines('')
p.writelines('')
p.writelines('')
#OTHERWISE
#
# p = EscposIO(printer.Network(printerAddress, port=printerPort))
# p.autoCutMode = 'PAPER_PART_CUT'
# p.autoclose = False
# p.writelines('LOGO')
# p.printer.nvRamImage()
# p.writelines('')
# p.printer.cut()
#