2 %%BoundingBox: 25 25 290 900
3 %%Title: AMANDA ExaLabel
8 %%%% This is a template file used by AMANDA to create PostScript tape
9 %%%% labels for each dump. This file is set up for DAT 4mm tapes,
10 %%%% but you can edit it to work with anything.
12 %%%% NOTE: this is quick-hack for DAT TAPES; it is simply a scaled
13 %%%% version of the Exabyte version.
17 % The label is made up of 6 parts: statistics, tape name, date,
18 % header, filesystem list, and the logo. Geometrically, the label
21 % +------------------------+
22 % |statistics | <- section 'A'
23 % +----+-------------------+
24 % |logo| TAPE_NAME | <- section 'B' (logo) <- section 'F'
25 % | | version date | <- section 'C'
26 % +----+--+--------+-------+
27 % | h fs l | h fs l | <- section 'D'
28 % +-------+--------+-------+
29 % | | | <- section 'E'
33 % Sections D and E, which hold the bulk of the information are
37 % Quick-hack for DAT tapes
41 % section 'A' font, start position, and line separation
43 /StatFont { /Courier findfont 9 scalefont setfont } def
44 /StatPos { 40 740 } def
47 % section 'B' font and position (text centered around this point)
49 /TitleFont { /Helvetica-Bold findfont 24 scalefont setfont } def
50 /TitlePos { 180 685 } def
52 % section 'C' font, position of the date (left justified) and the version
54 /DateFont { /Palatino-Bold findfont 10 scalefont setfont } def
55 /DatePos { 280 670 } def
56 /VersFont { /Palatino-Bold findfont 10 scalefont setfont } def
57 /VersPos { 80 670 } def
59 % section 'D' font, and field positions (x coord is relative to each column)
62 /HeadingFont { /Palatino-Bold findfont 8 scalefont setfont } def
63 /HeadingHostPos { 5 650 } def
64 /HeadingFsPos { 45 650 } def
65 /HeadingLvlPos { 120 650 } def
67 % section 'E' font, and line separation
69 /HostFont { /Courier findfont 6 scalefont setfont } def
73 % the following rectangles separate the regions
75 /StatBox { 290 750 25 710 } def
76 /TitleBox { 290 710 25 665 } def
77 /LogoBox { 70 710 25 665 } def
78 /HeadingBox { 290 665 25 645 } def
79 /HostBox { 290 645 25 0 } def
82 % number of columns for section 'E,' column width, position of first
83 % entry in first column, y coordinate of top and bottom of dividing lines
86 /ColumnWidth { 132 } def
87 /ColumnBasePos { 25 633 } def
88 /TopColDivLine { 665 } def
89 /BotColDivLine { 0 } def
93 %%%% END OF USER-CONFIGURABLE OPTIONS
95 %%%% the rest of this file contains the internal functions that are used
96 %%%% by genlabel to draw the label
101 % Initial Setup... draws everything that is the same for all labels
104 % function to draw a box
120 % move the origin up a bit
124 % draw all of the boxes
127 2 setlinewidth % thick lines
131 HeadingBox box stroke
135 % draw the column dividers
137 0.5 setlinewidth % thin lines
140 NumColumns i sub 0 le { exit } if % no lines if this last col.
141 /xoff ColumnBasePos pop % get x base position
142 i ColumnWidth mul add def % offset for this column
143 xoff TopColDivLine moveto
144 xoff BotColDivLine lineto stroke
149 % draw the heading names
154 NumColumns i sub 0 le { exit } if
155 /xoff ColumnBasePos pop
156 i ColumnWidth mul add def
157 HeadingHostPos exch xoff add exch moveto
159 HeadingFsPos exch xoff add exch moveto
161 HeadingLvlPos exch xoff add exch moveto
168 % the following functions draw strings for each kind of information
171 /CurrStatY StatPos exch pop def
172 ColumnBasePos /CurrColumnY exch def
173 /CurrColumnX exch def
176 % DrawStat draws the string on the top of the stack in the next position
181 StatPos pop CurrStatY moveto
183 /CurrStatY CurrStatY StatSep sub def
187 % DrawTitle draws the string on the top of the stack in section 'B'
192 dup stringwidth pop 2 div neg 0 rmoveto
197 % DrawDate draws the string on the top of the stack in section 'C'
202 dup stringwidth pop neg 0 rmoveto
207 % DrawVers draws the string on the top of the stack in section 'C'
216 % DrawHost expects five strings to be on the stack; right now it
217 % uses only the first three. The strings are Host Name, Partition Name,
218 % Dump Level, Tape File Number, and Output Size.
222 pop pop pop % discard sizes and fileno
223 CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
225 CurrColumnX HeadingFsPos pop add CurrColumnY moveto
227 CurrColumnX HeadingHostPos pop add CurrColumnY moveto
229 /CurrColumnY CurrColumnY HostSep sub def
230 CurrColumnY BotColDivLine lt {
231 /CurrColumnY ColumnBasePos exch pop def
232 /CurrColumnX CurrColumnX ColumnWidth add def
238 %%%% END OF TEMPLATE FILE