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
@timrprobocom
timrprobocom / AveryLabels.py
Last active March 20, 2025 11:35
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
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
# Usage:
# label = AveryLabels.AveryLabel(5160)