Cédric Bouvier > PostScript-LabelSheet-0.02 > pslabelsheet


Annotate this POD

View/Report Bugs


pslabelsheet - print sheets of labels from an EPS design.


    pslabelsheet --rows 10 --columns 3 --design /path/to/design.eps > sheet.ps


This program is merely a wrapper around the PostScript::LabelSheet module.

Why this module?

I sometimes have to print a sheet of labels, each label bearing the same design, for example to label jars of marmelade. I tried to do this with OpenOffice.org writer, in a table. But I had to manually copy and paste the design of the first label into every cell, and of course, if I changed the design, the changes had to be reported manually to the other cells. And of course, changing the dimensions, or adding a column or a row, need some manual intervention.

This module is here to easily print a sheet (or sheets) of labels representing a repeating pattern. Give it a design in Encapsulated PostScript (EPS), how many labels you want, how big they should be or how many should fit in the width and heigth of the page, and PostScript::LabelSheet generates the PostScript code for you, which you can then directly print.

There are options to print several kinds of labels on the same sheet, each with its own design, to draw a grid around the labels for cutting them, and to control how they are laid out on the page.

Additionally, labels can be numbered. This can be useful to print numbered tickets for a local event for instance.

Drawing the design

Use inkscape (http://www.inkscape.org) to draw the design that you want to print on each label. Keep the original in the SVG format, and export it as Encapsulated PostScript for use with PostScript::LabelSheet.

The size of the design is unimportant, as this is vector graphics, the generated PostScript program will resize without losing quality so that it fits within a label. What is important, however, is that the design occupies all the space on the page. The easiest is to draw without giving any thought to the page, then adjust the page size to the drawing. In inkscape, you can use the Document Properties dialog box to let the page fit the design exactly (menu File, Document Properties, in the Page tab, click the "Fit page to selection" button).

To save the design in EPS format, in inkscape, go to menu File, Save a copy, and choose the "Encapsulated PostScript (*.eps)" format. Inkscape will show a dialog with options for the conversion to EPS. Do check the box "Make bounding box around full page", so that the generated EPS code contains information about the size of the design. PostScript::LabelSheet needs it to work out the scale at which the design should be included on the page.


General options

-h, --help

Displays this help text and exits.

-v, --version

Displays the program's version and exits.

Adding designs


Labels management


Give the number of columns and rows in which the labels should be laid out on each page. The labels width and height will be calculated accordingly.


Give the width and height of each label. The program will automatically calculate how many labels will fit on each row and column.


Without this option, the last label is repeated until the end of the last page.



Dimensions of the page. Default to 297 mm and 210 mm (DIN A4).


Vertical (top and bottom) and horizontal (left and right) margins. Default to 5 mm. Use --margin to set both --v-margin and --h-margin at the same time. It is not possible to set the top margin independantly from the bottom margin, nor the left margin independantly from the right one.


Space between columns (--h-spacing) or rows (--v-spacing) of labels. Use --spacing to set both --h-spacing and --v-spacing at the same time.


Space left blank inside each label and around the design within. Default to 0. Use --padding to set both --h-padding and --v-padding at the same time.


Number of labels to leave blank at the top of the first page. The default is to start at the top left of the page.


Rotate the designs 90 degrees clockwise within each label.


Draws a grid around the labels. This is the default, use --no-grid if you want to print borderless labels.




Cedric Bouvier <cbouvi@cpan.org>.

syntax highlighting: