Xprinter Xpn160ii Driver !full! -
def qr_code(self, data, size=6): """Print QR code""" self._write(b'\x1D\x28\x6B\x03\x00\x31\x43' + bytes([size])) pl = len(data) + 3 plh = pl & 0xFF pll = (pl >> 8) & 0xFF self._write(b'\x1D\x28\x6B' + bytes([plh, pll, 0x31, 0x50, 0x30]) + data.encode('cp437')) self._write(b'\x1D\x28\x6B\x03\x00\x31\x51\x30')