parent
0ef2951c7e
commit
6734864a5b
|
@ -46,7 +46,7 @@ class Escpos:
|
||||||
|
|
||||||
self._raw(S_RASTER_N)
|
self._raw(S_RASTER_N)
|
||||||
buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0)
|
buffer = "%02X%02X%02X%02X" % (((size[0]/size[1])/8), 0, size[1], 0)
|
||||||
self._raw(buffer.decode('hex'))
|
self._raw(binascii.unhexlify(buffer))
|
||||||
buffer = ""
|
buffer = ""
|
||||||
|
|
||||||
while i < len(line):
|
while i < len(line):
|
||||||
|
@ -55,7 +55,7 @@ class Escpos:
|
||||||
i += 8
|
i += 8
|
||||||
cont += 1
|
cont += 1
|
||||||
if cont % 4 == 0:
|
if cont % 4 == 0:
|
||||||
self._raw(buffer.decode("hex"))
|
self._raw(binascii.unhexlify(buffer))
|
||||||
buffer = ""
|
buffer = ""
|
||||||
cont = 0
|
cont = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue