2 %%BoundingBox: 0 0 595 842
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
40 72 25.4 div dup scale %% scale to millimeters
42 % section 'A' font, start position, and line separation
44 /StatFont { /Courier findfont 4.5 scalefont setfont } def
45 /StatPos { 30 255 } def
48 % section 'B' font and position (text centered around this point)
50 /TitleFont { /Helvetica-Bold findfont 10 scalefont setfont } def
51 /TitlePos { 115 230 } def
53 % section 'C' font, position of the date (left justified) and the version
55 /DateFont { /Palatino-Bold findfont 5 scalefont setfont } def
56 /DatePos { 190 222 } def
57 /VersFont { /Palatino-Bold findfont 5 scalefont setfont } def
58 /VersPos { 43 222 } def
60 % section 'D' font, and field positions (x coord is relative to each column)
63 /HeadingFont { /Palatino-Bold findfont 5 scalefont setfont } def
64 /HeadingHostPos { 0 212 } def
65 /HeadingFsPos { 25 212 } def
66 /HeadingLvlPos { 110 212 } def
68 % section 'E' font, and line separation
70 /HostFont { /Courier findfont 4 scalefont setfont } def
74 % the following rectangles separate the regions
76 /StatBox { 200 260 15 240 } def
77 /TitleBox { 200 240 15 220 } def
78 /LogoBox { 35 240 15 220 } def
79 /HeadingBox { 200 220 15 210 } def
80 /HostBox { 200 210 15 0 } def
83 % number of columns for section 'E,' column width, position of first
84 % entry in first column, y coordinate of top and bottom of dividing lines
87 /ColumnWidth { 132 } def
88 /ColumnBasePos { 25 190 } def
89 /TopColDivLine { 190 } def
90 /BotColDivLine { 0 } def
94 %%%% END OF USER-CONFIGURABLE OPTIONS
96 %%%% the rest of this file contains the internal functions that are used
97 %%%% by genlabel to draw the label
102 % Initial Setup... draws everything that is the same for all labels
105 % function to draw a box
121 % move the origin up a bit
125 % draw all of the boxes
128 .3 setlinewidth % thick lines
132 HeadingBox box stroke
136 % draw the column dividers
138 0.5 setlinewidth % thin lines
141 NumColumns i sub 0 le { exit } if % no lines if this last col.
142 /xoff ColumnBasePos pop % get x base position
143 i ColumnWidth mul add def % offset for this column
144 xoff TopColDivLine moveto
145 xoff BotColDivLine lineto stroke
150 % draw the heading names
155 NumColumns i sub 0 le { exit } if
156 /xoff ColumnBasePos pop
157 i ColumnWidth mul add def
158 HeadingHostPos exch xoff add exch moveto
160 HeadingFsPos exch xoff add exch moveto
162 HeadingLvlPos exch xoff add exch moveto
169 % the following functions draw strings for each kind of information
172 /CurrStatY StatPos exch pop def
173 ColumnBasePos /CurrColumnY exch def
174 /CurrColumnX exch def
177 % DrawStat draws the string on the top of the stack in the next position
182 StatPos pop CurrStatY moveto
184 /CurrStatY CurrStatY StatSep sub def
188 % DrawTitle draws the string on the top of the stack in section 'B'
193 dup stringwidth pop 2 div neg 0 rmoveto
198 % DrawDate draws the string on the top of the stack in section 'C'
203 dup stringwidth pop neg 0 rmoveto
208 % DrawVers draws the string on the top of the stack in section 'C'
217 % DrawHost expects five strings to be on the stack; right now it
218 % uses only the first three. The strings are Host Name, Partition Name,
219 % Dump Level, Tape File Number, and Output Size.
223 pop pop pop % discard sizes and fileno
224 CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
226 CurrColumnX HeadingFsPos pop add CurrColumnY moveto
228 CurrColumnX HeadingHostPos pop add CurrColumnY moveto
230 /CurrColumnY CurrColumnY HostSep sub def
231 CurrColumnY BotColDivLine lt {
232 /CurrColumnY ColumnBasePos exch pop def
233 /CurrColumnX CurrColumnX ColumnWidth add def
239 %%%% END OF TEMPLATE FILE