fix: produce slightly bigger numbers
This commit is contained in:
parent
d7af8e0b2d
commit
f5ef56f9ca
3 changed files with 11 additions and 7 deletions
|
|
@ -10,13 +10,18 @@ from paperless_asn_qr_codes import avery_labels
|
|||
def render(c, x, y):
|
||||
global startASN
|
||||
global digits
|
||||
|
||||
text_height = 3 * mm
|
||||
barcode_scaling_factor = 1
|
||||
barcode_indent = 0 * mm;
|
||||
|
||||
barcode_value = f"ASN{startASN:0{digits}d}"
|
||||
startASN = startASN + 1
|
||||
|
||||
qr = QRCodeImage(barcode_value, size=y * 0.9)
|
||||
qr.drawOn(c, 1 * mm, y * 0.05)
|
||||
c.setFont("Helvetica", 2 * mm)
|
||||
c.drawString(y, (y - 2 * mm) / 2, barcode_value)
|
||||
qr = QRCodeImage(barcode_value, size=y * barcode_scaling_factor)
|
||||
qr.drawOn(c, barcode_indent, y * ((1 - barcode_scaling_factor) / 2))
|
||||
c.setFont("Helvetica", text_height)
|
||||
c.drawString(y, (y - text_height) / 2, barcode_value)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue