mirror of
https://github.com/python-escpos/python-escpos
synced 2025-08-24 09:03:34 +00:00
First attempt at centering images and QRs (#250)
This was tested on ZJ-5890 with success. By default centering is deactivated for backward compatibility. Trying to center a QR code in native mode will raise an exception as we do not know ATM if the native rendering is centered by default or not. * Added basic tests for center feature * Check image size before centering
This commit is contained in:

committed by
Patrick Kanzler

parent
50c627fbb0
commit
b648cfd67f
@@ -16,4 +16,4 @@ if __name__ == '__main__':
|
||||
|
||||
# Adapt to your needs
|
||||
p = Usb(0x0416, 0x5011, profile="POS-5890")
|
||||
p.qr(content)
|
||||
p.qr(content, center=True)
|
||||
|
Reference in New Issue
Block a user