NAME

cardstock -- insert EPS file into output page for selected cardstock


SYNOPSIS

    cardstock <OPTIONS> file[:degrees][*quantity] ...


DESCRIPTION

Produce postscript output page with one or more encapsulated postscript (EPS) files inserted into card or label positions on the page. Each EPS file will rendered in turn into each subsequent card/label.

Encapsulated postscript (EPS) can be produced by many applications (e.g., Xfig), and is essentially postscript with a DSC BoundingBox comment, allowing an embedding application (like this one) to position and scale the image.

An optional rotation may be specified for each EPS file by appending :degrees to the filename. Rotation is counterclockwise, and is only supported in multiples of 90 degrees (i.e., 0, 90, 180, 270, ...). In all cases, the source EPS image will be scaled to fit the card/label space.

An optional quantity may be specified for each EPS file by appending *quantity to the filename.


EXAMPLES

Print a page with gridlines and all cards of one file:

    $ cardstock --stock=avery:5376 --drawgrid mycard.eps | lpr

Fully specify the card stock layout in command line options:

    $ cardstock --cols=2 --rows=5 --x0=52 --y0=36 \
                --dx==252 --dy=144 my.eps > out.ps ; gv out.ps

Call up a help page:

    $ cardstock --help

Print 3 cards/labels of one type, and 5 of another, the latter rotated by 90 degrees:

    $ cardstock --stock=avery:5376 my1.eps*3 my2.eps*5:90 | lpr


OPTIONS

--help
Print this manpage information.

--dump
Print cardstock database entries to stdout, then quit.

--stock=brand:model|paper
Specify card or label stock by ``brand:model'', e.g., --stock=avery:5376 (not case-sensitive), matching an entry in the cardstock database.

In addition, simple paper sizes may be used if desired, e.g., to place (one or more) an EPS images on a page. See the --dump option, above.

--regmarks
Draw registration marks in margins on card/label boundaries.

--drawgrid
Draw a grid, outlining cards/labels.

--noheader
Suppress printing header information in the margin. Default header includes date, user, command line, ...

--noclip
Suppress clipping EPS image to card region.

--defereps
Defer expanding EPS file until PostScript execution time


OPTIONS FOR LAYOUT

These options represent the parameters stored in the cardstock database, so are not necessary if a supported stock is used. All must be defined, either via the database or command options. Defined option values override values from the database. (Note: in following prototypes, int is an integer, num is an integer or floating point value.)

--cols int
--rows int
The number of columns and rows or cards or labels on the sheet.

--unit point|inch|cm|num
Unit must be one of ``point''(the default), ``inch'', ``cm'', or a number representing the number of typesetting points per the units used for the numeric parameters.

--x0 num
--y0 num
x0 is the left (W) margin, y0 is the bottom (S) margin.

--dx num
--dy num
dx is the card/label width, dy is the height.

--xb num
--yb num
xb and yb are the amount of space between each card or label. Note that these parameters are 0 for many products.

--passes int
The number of times to loop over the cardstock sheet. Default is 1. This can be used to overlay multiple eps images onto each or several labels.


HINTS

* Xfig can be used to create drawings of arbitrary complexity, including text, imported images, library figures, etc, then export the work as EPS.

* Ghostview (gv) makes a good print-previewer for ps files, and might avoid some dead trees, let alone wasting expensive card stock.

* The --drawgrid and --regmarks options may be used to print a sample sheet to confirm layout alignment on the target card or label stock.


BUGS

* Generalized rotation is not supported.

* EPSI preview images are not removed as recommended (Red Book v2, p725). However, this affects only the (spool) file size, and not the final results. (Q:Does cardstock even work with ESPI files?)

* An ad hoc database format was used, FWIW.


TODO

Maybe...

* Just a thought, but it may be desireable to merge the cardstock output into an existing PS (postscript format) page. OTOH, this might be done using other tools, e.g., psmerge...

* implement generalized transformations (any need for this?)

* consider allowing margins, offsets, etc. around each card

* add support for settings via environment, e.g,. $CARDSTOCK=...

* add support for system and local rc files, e.g., ~/.cardstockrc

* use some sort of standard/common format for describing products


VERSION

RCS version: $Header: /cvsroot/cardstock/cardstock/cardstock.pl,v 1.6 2006/11/21 08:16:11 kirv Exp $


AUTHOR

Ken Irving, Trident Software, jkirving@acsalaska.net