Created
January 3, 2020 13:46
-
-
Save ZdenekM/f37d9c6388a9041469edb9c0618ad454 to your computer and use it in GitHub Desktop.
Brother QL-700: print QR code example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from brother_ql.conversion import convert | |
from brother_ql.backends.helpers import send | |
from brother_ql.raster import BrotherQLRaster | |
import qrcode | |
PX_WIDTH = 696 | |
qr = qrcode.make('ARCOR2') | |
img = qr.get_image() | |
img = img.resize((PX_WIDTH, PX_WIDTH)) | |
qlr = BrotherQLRaster("QL-700") | |
qlr.exception_on_warning = True | |
send(instructions=convert(qlr, [img], "62"), printer_identifier="usb://0x04f9:0x2042", backend_identifier="pyusb", blocking=True) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment