fix QL-500 / QL-570 incomplete printing (issue #11)

This commit is contained in:
Philipp Klaus
2016-12-15 17:48:44 +01:00
parent 74faec45bd
commit e9159bc88a
+2 -2
View File
@@ -120,8 +120,8 @@ class BrotherQLRaster(object):
self.data += bytes([valid_flags]) self.data += bytes([valid_flags])
vals = [self._mtype, self._mwidth, self._mlength] vals = [self._mtype, self._mwidth, self._mlength]
self.data += b''.join(b'\x00' if val is None else val for val in vals) self.data += b''.join(b'\x00' if val is None else val for val in vals)
self.data += struct.pack('<L', rnumber) self.data += struct.pack('<L', rnumber-1)
self.data += bytes([self.page_number == 0]) self.data += bytes([0 if self.page_number == 0 else 1])
self.data += b'\x00' self.data += b'\x00'
# INFO: media/quality (1B 69 7A) --> found! (payload: 8E 0A 3E 00 D2 00 00 00 00 00) # INFO: media/quality (1B 69 7A) --> found! (payload: 8E 0A 3E 00 D2 00 00 00 00 00)