blob: 43ada5c69682e58da391270996f3e01ab48a8242 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/bin/rc
# Center pages and put cropmarks at each corner. Physical page size
# is set with -w and -h. The default is 8.5 by 11.0 inches. Device
# dependent code to change paper size (e.g. with setpageparams) goes
# in the prologue. You may need to customize the device dependent
# code that we distribute. By default it only supports variable page
# sizes on Linotronic typesetters, and assumes those typesetters are
# using 12 inch wide paper. Use -d to disable execution of device
# dependent PostScript code.
#
# What's here was written quickly and will likely be very different
# in our next release. It should be part of a more general program!!
#
POSTLIB=/sys/lib/postscript/prologues
PROLOGUE=$POSTLIB/cropmarks.ps
EXPANDPAGE=true
PAGEWIDTH=8.5
PAGEHEIGHT=11.0
SCALETOFIT=false
XOFFSET=0.0
YOFFSET=0.0
NONCONFORMING=%!PS
ENDPROLOG=%%EndProlog
BEGINSETUP=%%BeginSetup
ENDSETUP=%%EndSetup
while (! ~ $#* 0 && ~ $1 -*) {
switch ($1) {
case -d; EXPANDPAGE=false
case -h; shift; PAGEHEIGHT=$1
case -h*; PAGEHEIGHT=`{echo $1 | sed s/-h//}
case -s; SCALETOFIT=true
case -w; shift; PAGEWIDTH=$1
case -w*; PAGEWIDTH=`{echo $1 | sed s/-w//}
case -x; shift; XOFFSET=$1
case -x*; XOFFSET=`{echo $1 | sed s/-x//}
case -y; shift; YOFFSET=$1
case -y*; YOFFSET=`{echo $1 | sed s/-y//}
case -L; shift; PROLOGUE=$1
case -L*; PROLOGUE=`{echo $1 | sed s/-L//}
case --;
case -*; echo '$0: illegal option $1' >[1=2]; exit 1
}
shift
}
echo $NONCONFORMING
cat $PROLOGUE
echo $ENDPROLOG
echo $BEGINSETUP
echo 'CropmarkDict begin'
echo '/pageheight '$PAGEHEIGHT' def'
echo '/pagewidth '$PAGEWIDTH' def'
echo '/expandpage '$EXPANDPAGE' def'
echo '/scaletofit '$SCALETOFIT' def'
echo '/xoffset '$XOFFSET' def'
echo '/yoffset '$YOFFSET' def'
echo 'setup'
echo 'end'
echo $ENDSETUP
cat $*
|