cardstock -- insert EPS file into output page for selected cardstock
cardstock <OPTIONS> file[:degrees][*quantity] ...
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.
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
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.
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.)
* 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.
* 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.
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
RCS version: $Header: /cvsroot/cardstock/cardstock/cardstock.pl,v 1.6 2006/11/21 08:16:11 kirv Exp $
Ken Irving, Trident Software, jkirving@acsalaska.net