Printing Avery labels in Python can be achieved using different libraries depending on your desired level of control and complexity. Two options are the pylabels and reportlab libraries. (These are not the only ones.)
Note: pylabels is a Python library for creating PDFs to print sheets of labels. It uses the ReportLab PDF toolkit to produce the PDFs.
Create data to work with. This information will printed on labels and used to mail letters. (Christmas cards?)
Column | Description |
---|---|
First Name | used for sorting and searching |
Last Name | used for sorting and searching |
Phone Number | canonical form used for sorting and searching |
Mail Label Name | e.g. Mr and Mrs Smith |
Mail Label Address | Multi-line address |
Write a program that reads a CSV data file and print labels using the data.
Use a single label template.
Write a program that reads a CSV data file and print labels using the data.
Allow the user to select the label template to use. (Write code for 3 or 4 standard templates.)
From Spreadsheet to Print Labels Using Python
ReportLab PDF Library User Guide