Reportlab插入二维码
先在pypi.org安装reportlab_qrcode
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()