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 DLT tapes,
11 %%%% but you can edit it to work with anything.
16 % The label is made up of 6 parts: statistics, tape name, date,
17 % header, filesystem list, and the logo. Geometrically, the label
20 % +------------------------+
21 % |statistics | <- section 'A'
22 % +----+-------------------+
23 % |logo| TAPE_NAME | <- section 'B' (logo) <- section 'F'
24 % | | version date | <- section 'C'
25 % +----+--+--------+-------+
26 % |h fs l|h fs l|h fs l| <- section 'D'
27 % +-------+--------+-------+
28 % | | | | <- section 'E'
32 % Sections D and E, which hold the bulk of the information are
36 % section 'A' font, start position, and line separation
38 /StatFont { /Courier findfont 10 scalefont setfont } def
39 /StatPos { 40 738 } def
42 % section 'B' font and position (text centered around this point)
44 /TitleFont { /Helvetica-Bold findfont 28 scalefont setfont } def
45 /TitlePos { 180 635 } def
47 % section 'C' font, position of the date (left justified) and the version
49 /DateFont { /Palatino-Bold findfont 10 scalefont setfont } def
50 /DatePos { 310 610 } def
51 /VersFont { /Palatino-Bold findfont 10 scalefont setfont } def
52 /VersPos { 80 610 } def
54 % section 'D' font, and field positions (x coord is relative to each column)
57 /HeadingFont { /Palatino-Bold findfont 8 scalefont setfont } def
58 /HeadingLvlPos { 90 590 } def % Heading is right justified
59 /HeadingHostPos { 2 590 } def
60 /HeadingFsPos { 30 590 } def
62 % section 'E' font, and line separation
64 /HostFont { /Courier findfont 5 scalefont setfont } def
68 % the following rectangles separate the regions
70 /StatBox { 320 755 25 680 } def
71 /TitleBox { 320 680 25 605 } def
72 /LogoBox { 70 680 25 605 } def
73 /HeadingBox { 320 605 25 580 } def
74 /HostBox { 320 580 25 0 } def
77 % number of columns for section 'E,' column width, position of first
78 % entry in first column, y coordinate of top and bottom of dividing lines
81 /ColumnWidth { 98 } def
82 /ColumnBasePos { 25 568 } def
83 /TopColDivLine { 605 } def
84 /BotColDivLine { 0 } def
88 %%%% END OF USER-CONFIGURABLE OPTIONS
90 %%%% the rest of this file contains the internal functions that are used
91 %%%% by genlabel to draw the label
96 % Initial Setup... draws everything that is the same for all labels
99 % function to draw a box
115 % move the origin up a bit
119 % draw all of the boxes
122 2 setlinewidth % thick lines
126 HeadingBox box stroke
129 % draw the column dividers
131 0.5 setlinewidth % thin lines
135 NumColumns i sub 0 le { exit } if % no lines if this last col.
136 /xoff ColumnBasePos pop % get x base position
137 i ColumnWidth mul add def % offset for this column
138 xoff TopColDivLine moveto
139 xoff BotColDivLine lineto stroke
144 % draw the heading names
149 NumColumns i sub 0 le { exit } if
150 /xoff ColumnBasePos pop
151 i ColumnWidth mul add def
152 HeadingLvlPos exch xoff add exch moveto
153 (Lv) stringwidth pop neg 0 rmoveto (Lv) show
154 HeadingHostPos exch xoff add exch moveto
156 HeadingFsPos exch xoff add exch moveto
163 % the following functions draw strings for each kind of information
166 /CurrStatY StatPos exch pop def
167 ColumnBasePos /CurrColumnY exch def
168 /CurrColumnX exch def
171 % DrawStat draws the string on the top of the stack in the next position
176 StatPos pop CurrStatY moveto
178 /CurrStatY CurrStatY StatSep sub def
182 % DrawTitle draws the string on the top of the stack in section 'B'
187 dup stringwidth pop 2 div neg 0 rmoveto
192 % DrawDate draws the string on the top of the stack in section 'C'
197 dup stringwidth pop neg 0 rmoveto
202 % DrawVers draws the string on the top of the stack in section 'C'
211 % DrawHost expects five strings to be on the stack. The strings are
212 % Host Name, Partition Name, Dump Level, Tape File Number, and Output Size.
213 % Right now, the Output Size and file umber are discarded.
217 pop pop pop % discard sizes and fileno
218 CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
220 CurrColumnX HeadingFsPos pop add CurrColumnY moveto
222 CurrColumnX HeadingHostPos pop add CurrColumnY moveto
224 /CurrColumnY CurrColumnY HostSep sub def
225 CurrColumnY BotColDivLine lt {
226 /CurrColumnY ColumnBasePos exch pop def
227 /CurrColumnX CurrColumnX ColumnWidth add def
231 %%%% END OF TEMPLATE FILE