2 %%BoundingBox: 25 25 290 900
3 %%Title: AMANDA ExaLabel
4 %%Creator: AMANDA genlabel program
9 %%%% This is a template file used by AMANDA to create PostScript tape
10 %%%% labels for each dump. This file is set up for Exabyte 8mm tapes,
11 %%%% but you can edit it to work with anything.
15 % The label is made up of 6 parts: statistics, tape name, date,
16 % header, filesystem list, and the logo. Geometrically, the label
19 % +------------------------+
20 % |statistics | <- section 'A'
21 % +----+-------------------+
22 % |logo| TAPE_NAME | <- section 'B' (logo) <- section 'F'
23 % | | version date | <- section 'C'
24 % +----+--+--------+-------+
25 % | h fs l| h fs l | h fs l| <- section 'D'
26 % +-------+--------+-------+
27 % | | | | <- section 'E'
31 % Sections D and E, which hold the bulk of the information are
35 % section 'A' font, start position, and line separation
37 /StatFont { /Courier findfont 9 scalefont setfont } def
38 /StatPos { 40 740 } def
41 % section 'B' font and position (text centered around this point)
43 /TitleFont { /Helvetica-Bold findfont 24 scalefont setfont } def
44 /TitlePos { 180 685 } def
46 % section 'C' font, position of the date (left justified) and the version
48 /DateFont { /Palatino-Bold findfont 10 scalefont setfont } def
49 /DatePos { 280 670 } def
50 /VersFont { /Palatino-Bold findfont 10 scalefont setfont } def
51 /VersPos { 80 670 } def
53 % section 'D' font, and field positions (x coord is relative to each column)
56 /HeadingFont { /Palatino-Bold findfont 8 scalefont setfont } def
57 /HeadingLvlPos { 126 650 } def % Heading is right justified
58 /HeadingHostPos { 5 650 } def
59 /HeadingFsPos { 45 650 } def
61 % section 'E' font, and line separation
63 /HostFont { /Courier findfont 6 scalefont setfont } def
67 % the following rectangles separate the regions
69 /StatBox { 290 750 25 710 } def
70 /TitleBox { 290 710 25 665 } def
71 /LogoBox { 70 710 25 665 } def
72 /HeadingBox { 290 665 25 645 } def
73 /HostBox { 290 645 25 0 } def
76 % number of columns for section 'E,' column width, position of first
77 % entry in first column, y coordinate of top and bottom of dividing lines
80 /ColumnWidth { 132 } def
81 /ColumnBasePos { 25 633 } def
82 /TopColDivLine { 665 } def
83 /BotColDivLine { 0 } def
87 %%%% END OF USER-CONFIGURABLE OPTIONS
89 %%%% the rest of this file contains the internal functions that are used
90 %%%% by genlabel to draw the label
95 % Initial Setup... draws everything that is the same for all labels
98 % function to draw a box
114 % move the origin up a bit
118 % draw all of the boxes
121 2 setlinewidth % thick lines
125 HeadingBox box stroke
129 % draw the column dividers
131 0.5 setlinewidth % thin lines
134 NumColumns i sub 0 le { exit } if % no lines if this last col.
135 /xoff ColumnBasePos pop % get x base position
136 i ColumnWidth mul add def % offset for this column
137 xoff TopColDivLine moveto
138 xoff BotColDivLine lineto stroke
143 % draw the heading names
148 NumColumns i sub 0 le { exit } if
149 /xoff ColumnBasePos pop
150 i ColumnWidth mul add def
151 HeadingLvlPos exch xoff add exch moveto
152 (Lv) stringwidth pop neg 0 rmoveto (Lv) show
153 HeadingHostPos exch xoff add exch moveto
155 HeadingFsPos exch xoff add exch moveto
162 % the following functions draw strings for each kind of information
165 /CurrStatY StatPos exch pop def
166 ColumnBasePos /CurrColumnY exch def
167 /CurrColumnX exch def
170 % DrawStat draws the string on the top of the stack in the next position
175 StatPos pop CurrStatY moveto
177 /CurrStatY CurrStatY StatSep sub def
181 % DrawTitle draws the string on the top of the stack in section 'B'
186 dup stringwidth pop 2 div neg 0 rmoveto
191 % DrawDate draws the string on the top of the stack in section 'C'
196 dup stringwidth pop neg 0 rmoveto
201 % DrawVers draws the string on the top of the stack in section 'C'
210 % DrawHost expects five strings to be on the stack. The strings are
211 % Host Name, Partition Name, Dump Level, Tape File Number, and Output Size.
212 % Right now, the Output Size is discarded.
216 pop pop pop % discard sizes and fileno
217 CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
219 CurrColumnX HeadingFsPos pop add CurrColumnY moveto
221 CurrColumnX HeadingHostPos pop add CurrColumnY moveto
223 /CurrColumnY CurrColumnY HostSep sub def
224 CurrColumnY BotColDivLine lt {
225 /CurrColumnY ColumnBasePos exch pop def
226 /CurrColumnX CurrColumnX ColumnWidth add def
232 %%%% END OF TEMPLATE FILE