LabelNation is a command-line label-printing program.
Here's how it works: you tell LabelNation what text you want on each label. You can specify plain lines of text, or even arbitrary PostScript code. You also tell it what kind of labels it should print for. LabelNation takes all this information and produces a PostScript file, which you then send to your PostScript printer (or through a filter such as GNU GhostScript). Of course, there must be a sheet of peel-off labels in the paper tray. Such sheets are widely available at office supply stores. Two companies that offer it are Avery Dennison and Maco. This is not a recommendation nor an endorsement; Avery and Maco are simply the names I've seen.
LabelNation does automatic font resizing to fit all the lines of text on the label, supports the usual accented characters (á, à, ó, etc, from ISO 8859-1), and has built-in knowledge of the following standard label types:
Avery-5168 (4 labels per page)
Avery-5264 (6 labels per page)
Avery-5263, 5663, 5963, 8163 (10 labels per page)
Avery-5161, 5261, 5661, 5961 (20 labels per page)
Avery-5162, 5262, 5662, 5962, (14 labels per page)
8162, 8252, 8462,
15162, 18162, 18662
Maco-LL5805 (30 labels per page)
Avery-5160, 5260, 5660, 5960, 5970,
5971, 5972, 5979, 5980, 6241,
6460, 6245, 8660
Maco-LL8100 (80 labels per page)
Avery-5167, 5667, 6467
Avery-5371 / Maco-LL8550 (10 bcards per page)
Avery-7162 (16 labels per page)
Avery-6571 (32 labels per page)
Avery-7160 (21 labels per A4 page)
Avery-7159 (24 labels per A4 page)
Avery-2651 (65 labels per A4 page)
Avery-2160 / Maverick ST340817 (8 labels per 10" page)
Types not listed above are still supported -- you just have to tell LabelNation what sizes the labels are, and how many per page vertically and horizontally. (And then please send in your parameters, so there will be built-in support for those labels in future releases.)
LabelNation requires Python, and a user who's comfortable dealing with text- and option-based configuration, as opposed to a graphical user interface.
How To Use It:
Let's start with return address labels. If you wanted to print a sheet of them using the Avery 5167 standard (80 small labels per page), you might invoke LabelNation like this:
prompt$ labelnation -t avery5167 -i myaddress.txt -l -o myaddress.ps
The "-t" stands for "type", followed by one of the standard predefined label types. The "-i" means "input file", that is, where to take the label data from. The "-l" stands for "lines input", meaning that the format of the incoming data is lines of text (as opposed to PostScript code). The "-o" specifies the output file, which you'll print to get the labels.
Here is a sample label lines file:
J. Random User
1423 W. Rootbeer Ave
Chicago, IL 60622
Note that the indentation is significant -- the farther you indent a line, the more whitespace will be between it and the left edge of the label. Three spaces is a typical indentation. Also note that blank lines are significant -- they are printed like any other text.
You can have as many lines as you want on a label; fonts will be automatically scaled down if there are too many lines to fit using the default font size.