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 { 1 212 } def
65 /HeadingFsPos { 17 212 } def
66 /HeadingLvlPos { 57 212 } def
68 % section 'E' font, and line separation
70 /HostFont { /Courier findfont 2.6 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
81 % Punckmark marks center of page height to aid punching holes for ring binder
82 /PunchMark { 13 130 15 130 } def
84 % number of columns for section 'E,' column width, position of first
85 % entry in first column, y coordinate of top and bottom of dividing lines
88 /ColumnWidth { 60 } def
89 /ColumnBasePos { 16 200 } def
90 /TopColDivLine { 201 } def
91 /BotColDivLine { 2 } def
96 %%%% END OF USER-CONFIGURABLE OPTIONS
98 %%%% the rest of this file contains the internal functions that are used
99 %%%% by genlabel to draw the label
104 % Initial Setup... draws everything that is the same for all labels
107 % function to draw a box
123 % move the origin up a bit
127 % draw all of the boxes
130 .3 setlinewidth % thick lines
134 HeadingBox box stroke
136 % and the PunchMark to aid puching ring binder holes
139 % draw the column dividers
141 0.2 setlinewidth % thin lines
144 NumColumns i sub 0 le { exit } if % no lines if this last col.
145 /xoff ColumnBasePos pop % get x base position
146 i ColumnWidth mul add def % offset for this column
147 xoff TopColDivLine moveto
148 xoff BotColDivLine lineto stroke
153 % draw the heading names
158 NumColumns i sub 0 le { exit } if
159 /xoff ColumnBasePos pop
160 i ColumnWidth mul add def
161 HeadingHostPos exch xoff add exch moveto
163 HeadingFsPos exch xoff add exch moveto
165 HeadingLvlPos exch xoff add exch moveto
172 % the following functions draw strings for each kind of information
175 /CurrStatY StatPos exch pop def
176 ColumnBasePos /CurrColumnY exch def
177 /CurrColumnX exch def
180 % DrawStat draws the string on the top of the stack in the next position
185 StatPos pop CurrStatY moveto
187 /CurrStatY CurrStatY StatSep sub def
191 % DrawTitle draws the string on the top of the stack in section 'B'
196 dup stringwidth pop 2 div neg 0 rmoveto
201 % DrawDate draws the string on the top of the stack in section 'C'
206 dup stringwidth pop neg 0 rmoveto
211 % DrawVers draws the string on the top of the stack in section 'C'
231 dup (* ) dup 4 2 roll length 24 sub 24 getinterval 1 exch putinterval
237 % DrawHost expects five strings to be on the stack; right now it
238 % uses only the first three. The strings are Host Name, Partition Name,
239 % Dump Level, Tape File Number, and Output Size.
243 pop pop pop % discard sizes and fileno
244 CurrColumnX HeadingLvlPos pop add CurrColumnY moveto
246 CurrColumnX HeadingFsPos pop add CurrColumnY moveto
249 CurrColumnX HeadingHostPos pop add CurrColumnY moveto
252 /CurrColumnY CurrColumnY HostSep sub def
253 CurrColumnY BotColDivLine lt {
254 /CurrColumnY ColumnBasePos exch pop def
255 /CurrColumnX CurrColumnX ColumnWidth add def
261 %%%% END OF TEMPLATE FILE