1 %------------------------------------------------------------------- 2 % Sample imbed file for cPost for an alternate header for cPost. 3 % This should be imbedded in the cPost output with the -i option. 4 % See cPost.doc for more information 5 %------------------------------------------------------------------- 6 7 %------------------------------------------------------------------ 8 % redefine the margin sizes 9 %------------------------------------------------------------------ 10 /lMargin .5 Inch def % margin: left 11 /rMargin .5 Inch def % margin: right 12 /tMargin 1 Inch def % margin: top 13 /bMargin .75 Inch def % margin: bottom 14 15 %------------------------------------------------------------------ 16 % header (and trailer) info 17 %------------------------------------------------------------------ 18 /yh1 pLength .65 Inch sub .25 Inch sub def 19 /yh2 pLength .5 Inch sub .25 Inch sub def 20 /yh3 .65 Inch def 21 /yh4 .45 Inch def 22 23 %------------------------------------------------------------------ 24 % line to print at top of the page 25 % put the text to be written in the header between the () 26 % characters. Do not use (, ), or / inbetween the () characters 27 % unless you know PostScript. 28 %------------------------------------------------------------------ 29 /logoText (Your name in lights) def 30 31 %------------------------------------------------------------------ 32 % print logo text 33 %------------------------------------------------------------------ 34 /printLogoText 35 { 36 /Times-Bold findfont 15 scalefont setfont 37 38 pWidth logoText stringwidth pop sub 2 div 39 pLength .65 Inch sub 40 moveto 41 42 logoText show 43 } def 44 45 %------------------------------------------------------------------ 46 % print a header and trailer for odd numbered pages 47 %------------------------------------------------------------------ 48 /header1 49 { 50 lColor aload pop setrgbcolor 51 printLogoText 52 53 newpath 54 lMargin yh1 moveto 55 pWidth rMargin sub yh1 lineto 56 stroke 57 58 /Times-Roman findfont 14 scalefont setfont 59 60 lMargin yh2 moveto 61 currFunc show 62 63 /numberBuffer 10 string def 64 pWidth rMargin sub 65 pageNum numberBuffer cvs stringwidth pop sub 66 (page ) stringwidth pop sub 67 yh2 moveto 68 (page ) show numberBuffer show 69 70 newpath 71 lMargin yh3 moveto 72 pWidth rMargin sub yh3 lineto 73 stroke 74 75 /Helvetica findfont 7 scalefont setfont 76 77 lMargin yh4 moveto 78 (Print date: ) show 79 printDate show 80 81 lMargin 2 Inch add yh4 moveto 82 (File date: ) show 83 fileDateTime show 84 85 /Times-Roman findfont 14 scalefont setfont 86 87 pWidth rMargin sub 88 fileName stringwidth pop sub 89 90 yh4 moveto 91 fileName show 92 } 93 def 94 95 %------------------------------------------------------------------ 96 % print a header and trailer for even numbered pages 97 %------------------------------------------------------------------ 98 /header2 99 { 100 lColor aload pop setrgbcolor 101 printLogoText 102 103 newpath 104 lMargin yh1 moveto 105 pWidth rMargin sub yh1 lineto 106 stroke 107 108 /Times-Roman findfont 14 scalefont setfont 109 110 pWidth rMargin sub 111 currFunc stringwidth pop sub 112 yh2 moveto 113 currFunc show 114 115 /numberBuffer 10 string def 116 pageNum numberBuffer cvs pop 117 lMargin yh2 moveto 118 (page ) show numberBuffer show 119 120 newpath 121 lMargin yh3 moveto 122 pWidth rMargin sub yh3 lineto 123 stroke 124 125 /Helvetica findfont 7 scalefont setfont 126 127 4 Inch yh4 moveto 128 (Print date: ) show 129 printDate show 130 131 6 Inch yh4 moveto 132 (File date: ) show 133 fileDateTime show 134 135 /Times-Roman findfont 14 scalefont setfont 136 137 lMargin yh4 moveto 138 fileName show 139 } 140 def 141