aboutsummaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorGerd Moellmann2000-06-07 15:38:19 +0000
committerGerd Moellmann2000-06-07 15:38:19 +0000
commitd30e4fd5fa2fc2e3644c8858a4260ebb9e1b2d0e (patch)
tree948ebdced7db929fdfeff055567e280a550c9265 /etc
parent8e234846db093306211c6c1ef8a9e5b4da33c386 (diff)
downloademacs-d30e4fd5fa2fc2e3644c8858a4260ebb9e1b2d0e.tar.gz
emacs-d30e4fd5fa2fc2e3644c8858a4260ebb9e1b2d0e.zip
Insert a version number comment (5.2.2). Can
select page size with/without giving an error if PostScript printer doesn't have this kind of page size. Zebra Stripe continues or restarts on next page. Indentation fix. (BeginSheet): If necessary, rescale n-up to fit on the sheet of paper. (BeginDoc, doColumnZebra, HeaderText): Code fix. (SetPageSize): New proc.
Diffstat (limited to 'etc')
-rw-r--r--etc/ps-prin1.ps277
1 files changed, 148 insertions, 129 deletions
diff --git a/etc/ps-prin1.ps b/etc/ps-prin1.ps
index a2fc98ac4b4..904c6031616 100644
--- a/etc/ps-prin1.ps
+++ b/etc/ps-prin1.ps
@@ -1,7 +1,8 @@
1% === BEGIN ps-print prologue 1 1% === BEGIN ps-print prologue 1
2% version: 5.2.2
2 3
3% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4: 4% ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
4/ISOLatin1Encoding where {pop}{ 5/ISOLatin1Encoding where{pop}{
5% -- The ISO Latin-1 encoding vector isn't known, so define it. 6% -- The ISO Latin-1 encoding vector isn't known, so define it.
6% -- The first half is the same as the standard encoding, 7% -- The first half is the same as the standard encoding,
7% -- except for minus instead of hyphen at code 055. 8% -- except for minus instead of hyphen at code 055.
@@ -13,37 +14,37 @@ StandardEncoding 46 82 getinterval aload pop
13%*** but appear in the displayed table: 14%*** but appear in the displayed table:
14%*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240. 15%*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.
15% 0200 (128) 16% 0200 (128)
16 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 17 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
17 /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef 18 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
18 /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent 19 /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent
19 /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron 20 /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron
20% 0240 (160) 21% 0240 (160)
21 /space /exclamdown /cent /sterling 22 /space/exclamdown/cent/sterling
22 /currency /yen /brokenbar /section 23 /currency/yen/brokenbar/section
23 /dieresis /copyright /ordfeminine /guillemotleft 24 /dieresis/copyright/ordfeminine/guillemotleft
24 /logicalnot /hyphen /registered /macron 25 /logicalnot/hyphen/registered/macron
25 /degree /plusminus /twosuperior /threesuperior 26 /degree/plusminus/twosuperior/threesuperior
26 /acute /mu /paragraph /periodcentered 27 /acute/mu/paragraph/periodcentered
27 /cedilla /onesuperior /ordmasculine /guillemotright 28 /cedilla/onesuperior/ordmasculine/guillemotright
28 /onequarter /onehalf /threequarters /questiondown 29 /onequarter/onehalf/threequarters/questiondown
29% 0300 (192) 30% 0300 (192)
30 /Agrave /Aacute /Acircumflex /Atilde 31 /Agrave/Aacute/Acircumflex/Atilde
31 /Adieresis /Aring /AE /Ccedilla 32 /Adieresis/Aring/AE/Ccedilla
32 /Egrave /Eacute /Ecircumflex /Edieresis 33 /Egrave/Eacute/Ecircumflex/Edieresis
33 /Igrave /Iacute /Icircumflex /Idieresis 34 /Igrave/Iacute/Icircumflex/Idieresis
34 /Eth /Ntilde /Ograve /Oacute 35 /Eth/Ntilde/Ograve/Oacute
35 /Ocircumflex /Otilde /Odieresis /multiply 36 /Ocircumflex/Otilde/Odieresis/multiply
36 /Oslash /Ugrave /Uacute /Ucircumflex 37 /Oslash/Ugrave/Uacute/Ucircumflex
37 /Udieresis /Yacute /Thorn /germandbls 38 /Udieresis/Yacute/Thorn/germandbls
38% 0340 (224) 39% 0340 (224)
39 /agrave /aacute /acircumflex /atilde 40 /agrave/aacute/acircumflex/atilde
40 /adieresis /aring /ae /ccedilla 41 /adieresis/aring/ae/ccedilla
41 /egrave /eacute /ecircumflex /edieresis 42 /egrave/eacute/ecircumflex/edieresis
42 /igrave /iacute /icircumflex /idieresis 43 /igrave/iacute/icircumflex/idieresis
43 /eth /ntilde /ograve /oacute 44 /eth/ntilde/ograve/oacute
44 /ocircumflex /otilde /odieresis /divide 45 /ocircumflex/otilde/odieresis/divide
45 /oslash /ugrave /uacute /ucircumflex 46 /oslash/ugrave/uacute/ucircumflex
46 /udieresis /yacute /thorn /ydieresis 47 /udieresis/yacute/thorn/ydieresis
47256 packedarray def 48256 packedarray def
48}ifelse 49}ifelse
49 50
@@ -54,16 +55,12 @@ StandardEncoding 46 82 getinterval aload pop
54 55
55 begin % Make the new font the current dictionary. 56 begin % Make the new font the current dictionary.
56 57
58 % Copy each of the symbols from the old dictionary
59 % to the new one except for the font ID.
60 {1 index/FID ne{def}{pop pop}ifelse}forall
57 61
58 {1 index /FID ne 62 % Override the encoding with the ISOLatin1 encoding.
59 {def}{pop pop}ifelse 63 currentdict/FontType get 0 ne{/Encoding ISOLatin1Encoding def}if
60 }forall % Copy each of the symbols from the old dictionary
61 % to the new one except for the font ID.
62
63 currentdict /FontType get 0 ne{
64 /Encoding ISOLatin1Encoding def % Override the encoding with
65 % the ISOLatin1 encoding.
66 }if
67 64
68 % Use the font's bounding box to determine the ascent, descent, 65 % Use the font's bounding box to determine the ascent, descent,
69 % and overall height; don't forget that these values have to be 66 % and overall height; don't forget that these values have to be
@@ -81,16 +78,14 @@ StandardEncoding 46 82 getinterval aload pop
81% | | v Descent (usually < 0) 78% | | v Descent (usually < 0)
82% (x1 y1) --> +----+ - - 79% (x1 y1) --> +----+ - -
83 80
84 currentdict /FontType get 0 ne{ 81 currentdict/FontType get 0 ne
85 /FontBBox load aload pop % -- x1 y1 x2 y2 82 {/FontBBox load aload pop % -- x1 y1 x2 y2
86 FontMatrix transform /Ascent exch def pop 83 FontMatrix transform/Ascent exch def pop
87 FontMatrix transform /Descent exch def pop 84 FontMatrix transform/Descent exch def pop}
88 }{ 85 {/PrimaryFont FDepVector 0 get def
89 /PrimaryFont FDepVector 0 get def 86 PrimaryFont/FontBBox get aload pop
90 PrimaryFont /FontBBox get aload pop 87 PrimaryFont/FontMatrix get transform/Ascent exch def pop
91 PrimaryFont /FontMatrix get transform /Ascent exch def pop 88 PrimaryFont/FontMatrix get transform/Descent exch def pop}ifelse
92 PrimaryFont /FontMatrix get transform /Descent exch def pop
93 }ifelse
94 89
95 /FontHeight Ascent Descent sub def % use `sub' because descent < 0 90 /FontHeight Ascent Descent sub def % use `sub' because descent < 0
96 91
@@ -112,34 +107,34 @@ StandardEncoding 46 82 getinterval aload pop
112 pop % Discard the returned font. 107 pop % Discard the returned font.
113}bind def 108}bind def
114 109
115/DefFont{ % Font definition 110% Font definition
116 findfont exch scalefont reencodeFontISO 111/DefFont{findfont exch scalefont reencodeFontISO}def
117}def
118 112
119/F{ % Font selection 113% Font selection
114/F{
120 findfont 115 findfont
121 dup /Ascent get /Ascent exch def 116 dup/Ascent get/Ascent exch def
122 dup /Descent get /Descent exch def 117 dup/Descent get/Descent exch def
123 dup /FontHeight get /FontHeight exch def 118 dup/FontHeight get/FontHeight exch def
124 dup /UnderlinePosition get /UnderlinePosition exch def 119 dup/UnderlinePosition get/UnderlinePosition exch def
125 dup /OverlinePosition get /OverlinePosition exch def 120 dup/OverlinePosition get/OverlinePosition exch def
126 dup /StrikeoutPosition get /StrikeoutPosition exch def 121 dup/StrikeoutPosition get/StrikeoutPosition exch def
127 dup /LineThickness get /LineThickness exch def 122 dup/LineThickness get/LineThickness exch def
128 dup /Xshadow get /Xshadow exch def 123 dup/Xshadow get/Xshadow exch def
129 dup /Yshadow get /Yshadow exch def 124 dup/Yshadow get/Yshadow exch def
130 dup /SpaceBackground get /SpaceBackground exch def 125 dup/SpaceBackground get/SpaceBackground exch def
131 dup /XBox get /XBox exch def 126 dup/XBox get/XBox exch def
132 dup /YBox get /YBox exch def 127 dup/YBox get/YBox exch def
133 setfont 128 setfont
134}def 129}def
135 130
136/FG /setrgbcolor load def 131/FG/setrgbcolor load def
137 132
138/bg false def 133/bg false def
139/BG{ 134/BG{
140 dup /bg exch def 135 dup/bg exch def
141 {mark 4 1 roll ]} 136 {[4 1 roll]}
142 {[ 1.0 1.0 1.0 ]} 137 {[1.0 1.0 1.0]}
143 ifelse 138 ifelse
144 /bgcolor exch def 139 /bgcolor exch def
145}def 140}def
@@ -181,11 +176,11 @@ StandardEncoding 46 82 getinterval aload pop
181/HL{PSL PLN}def % Hard Linefeed 176/HL{PSL PLN}def % Hard Linefeed
182 177
183% Some debug 178% Some debug
184/dcp{currentpoint exch 40 string cvs print (, ) print =}def 179/dcp{currentpoint exch 40 string cvs print(, )print =}def
185/dp{print 2 copy exch 40 string cvs print (, ) print =}def 180/dp{print 2 copy exch 40 string cvs print(, )print =}def
186 181
187/W{ 182/W{
188 ( ) stringwidth % Get the width of a space in the current font. 183 ( )stringwidth % Get the width of a space in the current font.
189 pop % Discard the Y component. 184 pop % Discard the Y component.
190 mul % Multiply the width of a space 185 mul % Multiply the width of a space
191 % by the number of spaces to plot 186 % by the number of spaces to plot
@@ -200,9 +195,9 @@ StandardEncoding 46 82 getinterval aload pop
200% effect: 1 - underline 2 - strikeout 4 - overline 195% effect: 1 - underline 2 - strikeout 4 - overline
201% 8 - shadow 16 - box 32 - outline 196% 8 - shadow 16 - box 32 - outline
202/S{ 197/S{
203 /xx currentpoint dup Descent add /yy exch def 198 /xx currentpoint dup Descent add/yy exch def
204 Ascent add /YY exch def def 199 Ascent add/YY exch def def
205 dup stringwidth pop xx add /XX exch def 200 dup stringwidth pop xx add/XX exch def
206 Effect 8 and 0 ne{ 201 Effect 8 and 0 ne{
207 /yy yy Yshadow add def 202 /yy yy Yshadow add def
208 /XX XX Xshadow add def 203 /XX XX Xshadow add def
@@ -259,9 +254,8 @@ StandardEncoding 46 82 getinterval aload pop
259 rXX ryy lineto 254 rXX ryy lineto
260 closepath 255 closepath
261 % top of stack: fill-or-not 256 % top of stack: fill-or-not
262 {FillBgColor} 257 {FillBgColor}
263 {LineThickness setlinewidth stroke} 258 {LineThickness setlinewidth stroke}ifelse
264 ifelse
265 grestore 259 grestore
266}bind def 260}bind def
267 261
@@ -278,15 +272,15 @@ StandardEncoding 46 82 getinterval aload pop
278% stack: string fill-or-not |- -- 272% stack: string fill-or-not |- --
279/doOutline{ 273/doOutline{
280 /-fillp- exch def 274 /-fillp- exch def
281 /-ox- currentpoint /-oy- exch def def 275 /-ox- currentpoint/-oy- exch def def
282 gsave 276 gsave
283 LineThickness setlinewidth 277 LineThickness setlinewidth
284 {st 0 3 -1 roll put 278 {st 0 3 -1 roll put
285 st dup true charpath 279 st dup true charpath
286 -fillp- {gsave FillBgColor grestore}if 280 -fillp- {gsave FillBgColor grestore}if
287 stroke stringwidth 281 stroke stringwidth
288 -oy- add /-oy- exch def 282 -oy- add/-oy- exch def
289 -ox- add /-ox- exch def 283 -ox- add/-ox- exch def
290 -ox- -oy- moveto 284 -ox- -oy- moveto
291 }forall 285 }forall
292 grestore 286 grestore
@@ -296,7 +290,7 @@ StandardEncoding 46 82 getinterval aload pop
296% stack: -- 290% stack: --
297/FillBgColor{bgcolor aload pop setrgbcolor fill}bind def 291/FillBgColor{bgcolor aload pop setrgbcolor fill}bind def
298 292
299/L0 6 /Times-Italic DefFont 293/L0 6/Times-Italic DefFont
300 294
301% stack: -- |- boolean 295% stack: -- |- boolean
302/isLineStep{ 296/isLineStep{
@@ -323,7 +317,7 @@ StandardEncoding 46 82 getinterval aload pop
323 /L0 findfont setfont 317 /L0 findfont setfont
324 LineNumber Lines ge 318 LineNumber Lines ge
325 {(end )} 319 {(end )}
326 {LineNumber 6 string cvs ( ) strcat}ifelse 320 {LineNumber 6 string cvs( )strcat}ifelse
327 dup stringwidth pop neg 0 rmoveto 321 dup stringwidth pop neg 0 rmoveto
328 show 322 show
329 grestore 323 grestore
@@ -333,7 +327,7 @@ StandardEncoding 46 82 getinterval aload pop
333}def 327}def
334 328
335% stack: color-specifier |- -- 329% stack: color-specifier |- --
336/SetColor{dup type /realtype eq{setgray}{aload pop setrgbcolor}ifelse}def 330/SetColor{dup type/realtype eq{setgray}{aload pop setrgbcolor}ifelse}def
337 331
338% stack: -- 332% stack: --
339/printZebra{ 333/printZebra{
@@ -342,16 +336,29 @@ StandardEncoding 46 82 getinterval aload pop
342 /double-zebra ZebraHeight ZebraHeight add def 336 /double-zebra ZebraHeight ZebraHeight add def
343 /yiter double-zebra LineHeight mul neg def 337 /yiter double-zebra LineHeight mul neg def
344 /xiter PrintWidth InterColumn add def 338 /xiter PrintWidth InterColumn add def
339 /zebra-line PageNumber 1 sub NumberOfColumns mul LinesPerColumn mul def
345 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat 340 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
346 grestore 341 grestore
347}def 342}def
348 343
349% stack: lines-per-column |- -- 344% stack: lines-per-column |- --
350/doColumnZebra{ 345/doColumnZebra{
346 /lpc exch def
351 gsave 347 gsave
352 dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat 348 ZebraFollow{
349 /H ZebraHeight zebra-line ZebraHeight mod sub def
350 /lpc lpc H sub def
351 zebra-line double-zebra mod ZebraHeight lt
352 {H doZebra % "black" stripe followed by a "white" stripe
353 /lpc lpc ZebraHeight sub def
354 H ZebraHeight add}
355 {H}ifelse % "white" stripe
356 LineHeight mul neg 0 exch rmoveto
357 /zebra-line zebra-line LinesPerColumn add def
358 }if
359 lpc dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
353 double-zebra mod 360 double-zebra mod
354 dup 0 le{pop}{dup ZebraHeight gt {pop ZebraHeight}if doZebra}ifelse 361 dup 0 le{pop}{dup ZebraHeight gt{pop ZebraHeight}if doZebra}ifelse
355 grestore 362 grestore
356}def 363}def
357 364
@@ -405,7 +412,7 @@ StandardEncoding 46 82 getinterval aload pop
405 translate 412 translate
406 setgray 413 setgray
407 rotate 414 rotate
408 findfont exch dup /-offset- exch -0.25 mul def scalefont setfont 415 findfont exch dup/-offset- exch -0.25 mul def scalefont setfont
409 0 -offset- moveto 416 0 -offset- moveto
410 /-saveLineThickness- LineThickness def 417 /-saveLineThickness- LineThickness def
411 /LineThickness 1 def 418 /LineThickness 1 def
@@ -414,14 +421,18 @@ StandardEncoding 46 82 getinterval aload pop
414 grestore 421 grestore
415}def 422}def
416 423
424/SetPageSize{
425 BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark setpagedevice
426}def
427
417/BeginDoc{ 428/BeginDoc{
418 % ---- Remember space width of the normal text font `f0'. 429 % ---- Remember space width of the normal text font `f0'.
419 /SpaceWidth /f0 findfont setfont ( ) stringwidth pop def 430 /SpaceWidth/f0 findfont setfont( )stringwidth pop def
420 % ---- save the state of the document (useful for ghostscript!) 431 % ---- save the state of the document (useful for ghostscript!)
421 /docState save def 432 /docState save def
422 % ---- [andrewi] set PageSize based on chosen dimensions 433 % ---- [andrewi] set PageSize based on chosen dimensions
423 UseSetpagedevice{ 434 UseSetpagedevice{
424 BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark setpagedevice 435 WarnPaperSize{SetPageSize}{mark{SetPageSize}stopped cleartomark}ifelse
425 }if 436 }if
426 /ColumnWidth PrintWidth InterColumn add def 437 /ColumnWidth PrintWidth InterColumn add def
427 % ---- define where printing will start 438 % ---- define where printing will start
@@ -439,9 +450,7 @@ StandardEncoding 46 82 getinterval aload pop
439 450
440/BeginDSCPage{ 451/BeginDSCPage{
441 % ---- when 1st column, save the state of the page 452 % ---- when 1st column, save the state of the page
442 ColumnIndex 1 eq{ 453 ColumnIndex 1 eq{/pageState save def}if
443 /pageState save def
444 }if
445 % ---- save the state of the column 454 % ---- save the state of the column
446 /columnState save def 455 /columnState save def
447}def 456}def
@@ -453,7 +462,7 @@ StandardEncoding 46 82 getinterval aload pop
453 ColumnIndex 1 eq{ 462 ColumnIndex 1 eq{
454 0 PrintStartY moveto % move to where printing will start 463 0 PrintStartY moveto % move to where printing will start
455 printBackground 464 printBackground
456 Zebra {printZebra}if 465 Zebra{printZebra}if
457 printGlobalBackground 466 printGlobalBackground
458 printLocalBackground 467 printLocalBackground
459 }if 468 }if
@@ -464,6 +473,13 @@ StandardEncoding 46 82 getinterval aload pop
464 }if 473 }if
465 }if 474 }if
466 0 PrintStartY moveto % move to where printing will start 475 0 PrintStartY moveto % move to where printing will start
476 /LineNumber where
477 {pop
478 SyncLineZebra
479 {/H PageNumber 1 sub NumberOfColumns mul ColumnIndex 1 sub add
480 LinesPerColumn mul ZebraHeight mod def
481 /PLScounter H PrintLineStart ge{0}{PrintLineStart H sub}ifelse def
482 /PrintLineStep ZebraHeight H sub def}if}if
467 PLN 483 PLN
468}def 484}def
469 485
@@ -476,15 +492,13 @@ StandardEncoding 46 82 getinterval aload pop
476 /ColumnIndex 1 def 492 /ColumnIndex 1 def
477 % ---- N-up printing 493 % ---- N-up printing
478 N-Up 1 gt{ 494 N-Up 1 gt{
479 N-Up-Counter 0 gt{ 495 N-Up-Counter 0 gt
480 % ---- Next page on same row 496 {% ---- Next page on same row
481 /N-Up-Counter N-Up-Counter 1 sub def 497 /N-Up-Counter N-Up-Counter 1 sub def
482 N-Up-XColumn N-Up-YColumn 498 N-Up-XColumn N-Up-YColumn}
483 }{ 499 {% ---- Next page on next line
484 % ---- Next page on next line
485 /N-Up-Counter N-Up-End 1 sub def 500 /N-Up-Counter N-Up-End 1 sub def
486 N-Up-XLine N-Up-YLine 501 N-Up-XLine N-Up-YLine}ifelse
487 }ifelse
488 translate 502 translate
489 }if 503 }if
490 }{ % else 504 }{ % else
@@ -525,11 +539,23 @@ StandardEncoding 46 82 getinterval aload pop
525 /HH LandscapePageHeight def 539 /HH LandscapePageHeight def
526 /WW PageWidth def 540 /WW PageWidth def
527 }ifelse 541 }ifelse
542 /xx 0 def
543 N-Up-Landscape{
544 /ww WW WW mul N-Up-Lines HH mul div def
545 /cc HH N-Up-Columns N-Up-Missing add div def
546 ww cc gt{/xx WW def/WW cc ww div WW mul def/xx xx WW sub def}if
547 }{
548 /hh HH N-Up-Columns N-Up-Missing add div def
549 /cc HH N-Up-Lines div def
550 hh cc gt{/xx WW def/WW cc hh div WW mul def/xx xx WW sub def}if
551 }ifelse
528 WW N-Up-Margin sub N-Up-Margin sub 552 WW N-Up-Margin sub N-Up-Margin sub
529 N-Up-Landscape 553 N-Up-Landscape
530 {N-Up-Lines div HH}{N-Up-Columns N-Up-Missing add div WW}ifelse 554 {N-Up-Lines div HH}
555 {N-Up-Columns N-Up-Missing add div WW}ifelse
531 div dup scale 556 div dup scale
532 0 N-Up-Repeat 1 sub LandscapePageHeight mul translate 557 LandscapeMode{/yy 0 def}{/yy xx def/xx 0 def}ifelse
558 xx N-Up-Repeat 1 sub LandscapePageHeight mul yy add translate
533 % ---- go to start position in page matrix 559 % ---- go to start position in page matrix
534 N-Up-XStart N-Up-Missing 0.5 mul 560 N-Up-XStart N-Up-Missing 0.5 mul
535 LandscapeMode 561 LandscapeMode
@@ -592,9 +618,8 @@ StandardEncoding 46 82 getinterval aload pop
592% | bm | 618% | bm |
593% |---------| 619% |---------|
594 620
595/HeaderFrameStart{ % -- x y 621% -- |- x y
596 0 PrintHeight HeaderOffset add 622/HeaderFrameStart{0 PrintHeight HeaderOffset add}def
597}def
598 623
599/HeaderFramePath{ 624/HeaderFramePath{
600 PrintHeaderWidth 0 rlineto 625 PrintHeaderWidth 0 rlineto
@@ -636,10 +661,7 @@ StandardEncoding 46 82 getinterval aload pop
636 661
637/pagenumberstring{ 662/pagenumberstring{
638 PageNumber 32 string cvs 663 PageNumber 32 string cvs
639 ShowNofN{ 664 ShowNofN{(/)strcat PageCount 32 string cvs strcat}if
640 (/) strcat
641 PageCount 32 string cvs strcat
642 }if
643}def 665}def
644 666
645/HeaderText{ 667/HeaderText{
@@ -650,7 +672,7 @@ StandardEncoding 46 82 getinterval aload pop
650 % ---- hack: `PN 1 and' == `PN 2 modulo' 672 % ---- hack: `PN 1 and' == `PN 2 modulo'
651 673
652 % ---- if even page number and duplex, then exchange left and right 674 % ---- if even page number and duplex, then exchange left and right
653 PageNumber 1 and 0 eq DuplexValue and{exch}if 675 PageNumber 1 and 0 eq SwitchHeader and{exch}if
654 676
655 { % ---- process the left lines 677 { % ---- process the left lines
656 aload pop 678 aload pop
@@ -682,48 +704,45 @@ StandardEncoding 46 82 getinterval aload pop
682 /t0 3 1 roll DefFont 704 /t0 3 1 roll DefFont
683 /t0 F 705 /t0 F
684 /lh FontHeight def 706 /lh FontHeight def
685 /sw ( ) stringwidth pop def 707 /sw( )stringwidth pop def
686 /aw (01234567890abcdefghijklmnopqrstuvwxyz) dup length exch 708 /aw(01234567890abcdefghijklmnopqrstuvwxyz)dup length exch
687 stringwidth pop exch div def 709 stringwidth pop exch div def
688 /t1 12 /Helvetica-Oblique DefFont 710 /t1 12/Helvetica-Oblique DefFont
689 /t1 F 711 /t1 F
690 gsave 712 gsave
691 (languagelevel = ) show 713 (languagelevel = )show
692 languagelevel 32 string cvs show 714 languagelevel 32 string cvs show
693 grestore 715 grestore
694 0 FontHeight neg rmoveto 716 0 FontHeight neg rmoveto
695 gsave 717 gsave
696 (For ) show 718 (For )show
697 128 string cvs show 719 128 string cvs show
698 ( ) show 720 ( )show
699 32 string cvs show 721 32 string cvs show
700 ( point, the line height is ) show 722 ( point, the line height is )show
701 lh 32 string cvs show 723 lh 32 string cvs show
702 (, the space width is ) show 724 (, the space width is )show
703 sw 32 string cvs show 725 sw 32 string cvs show
704 (,) show 726 (,)show
705 grestore 727 grestore
706 0 FontHeight neg rmoveto 728 0 FontHeight neg rmoveto
707 gsave 729 gsave
708 (and a crude estimate of average character width is ) show 730 (and a crude estimate of average character width is )show
709 aw 32 string cvs show 731 aw 32 string cvs show
710 (.) show 732 (.)show
711 grestore 733 grestore
712 0 FontHeight neg rmoveto 734 0 FontHeight neg rmoveto
713}def 735}def
714 736
715/cm{ % cm to point 737% cm to point
716 72 mul 2.54 div 738/cm{72 mul 2.54 div}def
717}def
718 739
719/ReportAllFontInfo{ 740/ReportAllFontInfo{
720 FontDirectory 741 % key = font name value = font dictionary
721 { % key = font name value = font dictionary 742 FontDirectory{pop 10 exch ReportFontInfo}forall
722 pop 10 exch ReportFontInfo
723 }forall
724}def 743}def
725 744
726% 3 cm 20 cm moveto 10 /Courier ReportFontInfo showpage 745% 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage
727% 3 cm 20 cm moveto ReportAllFontInfo showpage 746% 3 cm 20 cm moveto ReportAllFontInfo showpage
728 747
729% === END ps-print prologue 1 748% === END ps-print prologue 1