Skip to content

Instantly share code, notes, and snippets.

View Friedjof's full-sized avatar
👨‍💻
at work

Friedjof Noweck Friedjof

👨‍💻
at work
View GitHub Profile
@Friedjof
Friedjof / AveryLabels.py
Last active December 9, 2023 18:44 — forked from timrprobocom/AveryLabels.py
A class to manage printing on Avery labels with ReportLab
import os
from collections.abc import Iterator
from reportlab.pdfgen import canvas
from reportlab.lib.pagesizes import LETTER, landscape
from reportlab.lib.units import inch, mm, cm
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
# Usage:
# label = AveryLabels.AveryLabel(5160)