2 %%BoundingBox: 25 25 290 900
3 %%Title: AMANDA Full Page Label
4 %%Creator: Amanda reporter
9 %%%% This is a template file used by AMANDA to create 8.5 x 11 inch
10 %%%% PostScript dump logs for each dump.
14 % The label is made up of 6 parts: statistics, tape name, date,
15 % header, filesystem list, and the logo. Geometrically, the label
18 % +----+-------------------+
19 % | TAPE_NAME | <- section 'A'
20 % | version Location date | <- section 'B'
21 % +------------------------+
22 % |statistics | message | <- section 'C' | 'F'
23 % +----+--+--------+-------+
24 % | f# hst fs lvl O-KB C-KB| <- section 'D'
25 % +-------+--------+-------+
26 % | | | | <- section 'E'
31 % section 'A' font and position (text centered around this point)
33 /TitleFont { /Helvetica-Bold findfont 24 scalefont setfont } def
34 /TitlePos { 321 728 } def
36 % section 'B' font, position of the date (left justified) and the version
38 /DateFont { /Palatino-Bold findfont 11 scalefont setfont } def
39 /DatePos { 580 715 } def
40 /VersFont { /Palatino-Bold findfont 11 scalefont setfont } def
41 /VersPos { 43 715 } def
42 /LocFont { /Helvetica-Bold findfont 12 scalefont setfont } def
43 /LocPos { 321 715 } def
45 % section 'C' font, start position, and line separation
47 /StatFont { /Courier findfont 9 scalefont setfont } def
48 /StatPos { 43 695 } def
51 % section 'D' font, and field positions (x coord is relative to each column)
54 /HeadingFont { /Palatino-Bold findfont 9 scalefont setfont } def
55 /HeadingFilePos { 43 644 } def
56 /HeadingHostPos { 73 644 } def
57 /HeadingFsPos { 198 644 } def
58 /HeadingLvlPos { 333 644 } def
59 /HeadingOSizePos1 { 403 652 } def
60 /HeadingOSizePos { 403 644 } def
61 /HeadingCSizePos1 { 483 652 } def
62 /HeadingCSizePos { 483 644 } def
65 % section 'E' font, and line separation
67 /HostFont { /Courier findfont 9 scalefont setfont } def
69 /HostBasePos { 38 630 } def
71 % section 'F' font, and line separation
73 /MessFont { /Courier findfont 9 scalefont setfont } def
74 /MessPos { 215 702 } def
78 % the following rectangles separate the regions
80 /TitleBox { 590 750 38 710 } def
81 /StatBox { 590 710 38 660 } def
82 /HeadingBox { 590 660 38 640 } def
83 /HostBox { 590 640 38 0 } def
84 /CFline { 208 710 208 660 } def
90 %%%% END OF USER-CONFIGURABLE OPTIONS
92 %%%% the rest of this file contains the internal functions that are used
93 %%%% by genlabel to draw the label
98 % Initial Setup... draws everything that is the same for all labels
101 % function to draw a box
117 % move the origin up a bit
121 % draw all of the boxes
124 2 setlinewidth % thick lines
127 HeadingBox box stroke
129 CFline moveto lineto stroke
133 HeadingFilePos moveto
135 HeadingHostPos moveto
140 (Level) stringwidth pop 2 div neg 0 rmoveto (Level) show
141 HeadingOSizePos1 moveto
142 (Original) stringwidth pop 2 div neg 0 rmoveto (Original) show
143 HeadingOSizePos moveto
144 (File Size (KB)) stringwidth pop 2 div neg 0 rmoveto (File Size (KB)) show
145 HeadingCSizePos1 moveto
146 (Compressed) stringwidth pop 2 div neg 0 rmoveto (Compressed) show
147 HeadingCSizePos moveto
148 (File Size (KB)) stringwidth pop 2 div neg 0 rmoveto (File Size (KB)) show
152 % the following functions draw strings for each kind of information
155 /CurrStatY StatPos exch pop def
156 /CurrMessY MessPos exch pop def
157 HostBasePos /CurrColumnY exch def
158 /CurrColumnX exch def
161 % DrawStat draws the string on the top of the stack in the next position
166 StatPos pop CurrStatY moveto
168 /CurrStatY CurrStatY StatSep sub def
172 % DrawTitle draws the string on the top of the stack in section 'B'
177 dup stringwidth pop 2 div neg 0 rmoveto
182 % DrawDate draws the string on the top of the stack in section 'C'
187 dup stringwidth pop neg 0 rmoveto
191 % DrawLoc draws the string on the top of the stack in section 'C'
196 dup stringwidth pop 2 div neg 0 rmoveto
200 % DrawVers draws the string on the top of the stack in section 'C'
208 % DrawMess draws the string on the top of the stack in section 'F'
212 MessPos pop CurrMessY moveto
214 /CurrMessY CurrMessY MessSep sub def
217 % Fill in Location name and message
219 (Magic Software Development, Inc.) DrawLoc
221 (To restore:) DrawMess
222 ( position tape at the start of the file and run:) DrawMess
223 ( dd if=/dev/nrst0 bs=32k skip=1 | zcat | restore -if -) DrawMess
225 ( amrestore -p /dev/nrst0 <host> <filesystem> | restore -if -) DrawMess
228 % DrawHost expects six strings to be on the stack. The strings are
229 % Host Name, Partition Name, Dump Level, Tape File Number, and Output Size.
233 .25 setlinewidth % thin lines
234 HeadingCSizePos pop CurrColumnY moveto
236 HeadingOSizePos pop CurrColumnY moveto
238 HeadingFilePos pop CurrColumnY moveto
240 HeadingLvlPos pop CurrColumnY moveto
242 HeadingFsPos pop CurrColumnY moveto
244 HeadingHostPos pop CurrColumnY moveto
246 38 CurrColumnY 2.5 sub moveto 590 CurrColumnY 2.5 sub lineto stroke
247 /CurrColumnY CurrColumnY HostSep sub def
252 %%%% END OF TEMPLATE FILE