mirror of
https://github.com/python-escpos/python-escpos
synced 2025-09-13 09:09:58 +00:00
Ensure QR codes have a border large enough for successful scan
(The QR code spec requires a border at least 4*box_size thick but we can't just set border=16 because that results in a QR code more than 255px tall and I'm not yet ready to use fullimage() as a backend for it)
This commit is contained in:
@@ -152,7 +152,10 @@ class Escpos:
|
||||
qr_img = qr_code.make_image()
|
||||
# Convert the RGB image in printable image
|
||||
im = qr_img._img.convert("RGB")
|
||||
self.text('\n')
|
||||
self.set(align='center')
|
||||
self.image(im)
|
||||
self.text('\n')
|
||||
|
||||
def barcode(self, code, bc, height, width, pos, font):
|
||||
""" Print Barcode """
|
||||
|
Reference in New Issue
Block a user