Skip to main content

Allows to create QR codes for use with the ReportLab PDF library.

Project description

reportlab-qrcode

reportlab-qrcode implements a QR code flowable for the ReportLab PDF library using the qrcode package.

Installation

reportlab-qrcode can be installed via pip:

pip install reportlab-qrcode

Usage

Simply use the QRCodeImage class with your data. All non-recognized keyword arguments will be passed to the qrcode.QRCode class from the qrcode package.

from reportlab.lib.units import mm
from reportlab.pdfgen.canvas import Canvas
from reportlab_qrcode import QRCodeImage

doc = Canvas('simple.pdf')
qr = QRCodeImage('Some data here', size=30 * mm)
qr.drawOn(doc, 0, 0)
doc.showPage()
doc.save()

For further examples, including setting fill and back colors, QR code size, error correction level, as well as using the QR code as ReportLab Flowable object, see the examples directory.

Maintenance note

This package is considered completed. So please do not wonder if you see no further commits. Despite the lack of new commits, this package is still maintained, i. e., I plan to keep this package compatible with the newest Python, qrcode and ReportLab version. If you find a bug, please open an issue in the issue tracker.

License

reportlab-qrcode is licensed under the MIT license. See LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

reportlab-qrcode-0.1.6.tar.gz (4.4 kB view details)

Uploaded Source

File details

Details for the file reportlab-qrcode-0.1.6.tar.gz.

File metadata

  • Download URL: reportlab-qrcode-0.1.6.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for reportlab-qrcode-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9bfa1eb80efdecc1013890481b5e7b5486bb4db11b45154afcef00af3fe83bfa
MD5 44ebb45da67363a61a492ef46871ce34
BLAKE2b-256 db1d7c7428dc162a5cabb1cd5b63be6095690a26e605feef30f88a54250b3fa8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page