home *** CD-ROM | disk | FTP | other *** search
- %!PS
- % @(#) $Header: cards.ps,v 1.1 90/06/11 02:56:04 jef Exp $
- %
- % cards.ps - set up PostScript environment for fake IDs
- %
- % Copyright (C) 1990 by Jef Poskanzer. All rights reserved.
- %
- % This file defines:
- % cardwidth, cardheight - sizes the card should be drawn to
- % cardmargin - card should leave this much space inside the above sizes
- % cardstart - all cards must start off by calling this
- % cardend - all cards must call this when they are through
- % cardticks - draws cut-marks that line up with cardwidth and cardheight
-
-
- % The card is defined in terms of these nominal sizes.
- /cardwidth 3.125 in def
- /cardheight 1.875 in def
- /cardmargin .05 in def
-
-
- % Un-comment one of the following groups to set the desired size of the card.
-
- % Wallet size.
- /actualwidth cardwidth def
- /actualheight cardheight def
-
- % Shirt-pocket size.
- %/actualwidth 3.5 in def
- %/actualheight 2.25 in def
-
- % Business-card size.
- %/actualwidth 3.5 in def
- %/actualheight 2 in def
-
- % Economy size.
- %/actualwidth 6.5 in def
- %/actualheight 4.5 in def
-
-
- % Define arrangement of cards on the page.
-
- /cardswide 2 def
- /cardshigh 4 def
- /cardslotwidth pagewidth pagemargin 2 mul sub cardswide div def
- /cardslotheight pageheight pagemargin 2 mul sub cardshigh div def
-
- /cardslot 0 def
-
- /cardstart {
- cardslot cardswide cardshigh mul ge {
- showpage
- /cardslot 0 def
- } if
- gsave
- cardslotwidth cardslot cardswide mod mul pagemargin add % dx
- cardslotheight cardslot cardswide idiv 1 add mul
- pageheight pagemargin sub exch sub % dx dy
- translate
- actualwidth cardwidth div actualheight cardheight div scale
- } def
-
- /cardend {
- grestore
- /cardslot cardslot 1 add def
- } def
-
- /cardtick 0.08 in def
- /cardticks {
- 0 0 moveto cardtick neg 0 rmoveto cardtick neg 0 rlineto stroke
- 0 0 moveto 0 cardtick neg rmoveto 0 cardtick neg rlineto stroke
- cardwidth 0 moveto cardtick 0 rmoveto cardtick 0 rlineto stroke
- cardwidth 0 moveto 0 cardtick neg rmoveto 0 cardtick neg rlineto stroke
- cardwidth cardheight moveto cardtick 0 rmoveto cardtick 0 rlineto stroke
- cardwidth cardheight moveto 0 cardtick rmoveto 0 cardtick rlineto stroke
- 0 cardheight moveto cardtick neg 0 rmoveto cardtick neg 0 rlineto stroke
- 0 cardheight moveto 0 cardtick rmoveto 0 cardtick rlineto stroke
- } def
-