Skip to content

Instantly share code, notes, and snippets.

Avatar

lkrone

  • Hamburg, Germany
View GitHub Profile
@lkrone
lkrone / ean13-label-sheet.py
Created Dec 16, 2016
Shows a way to generate a PDF (with Python and ReportLab) of a sheet of labels containing EAN-13 Barcodes and a short, descriptive text.
View ean13-label-sheet.py
#!/usr/bin/env python3
from reportlab.lib.pagesizes import A4
from reportlab.graphics.shapes import Drawing, String
from reportlab.graphics.barcode.eanbc import Ean13BarcodeWidget
from reportlab.graphics import renderPDF
from reportlab.pdfgen.canvas import Canvas
"""
Adjust pagesize, number of labels, barcode size and