Home » Personal collection » Acorn ADFS disks » Archimedes » RiscOs_Apps_1.ADF » !PrinterPS/PStprolog

!PrinterPS/PStprolog

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Personal collection » Acorn ADFS disks » Archimedes » RiscOs_Apps_1.ADF
Filename: !PrinterPS/PStprolog
Read OK:
File size: 0964 bytes
Load address: FFFFFF41
Exec address: 9FCC4F68
Duplicates

There are 2 duplicate copies of this file in the archive:

File contents
% > <PDriver$Dir>.PStprolog
% PostScript prologue file for simple text printing
% Version 1.00, first used with version 1.03 of the !PrinterPS application

/StartPage {                            % Start of page routine. Wants the
 save 7 1 roll                          % following values on the stack:
 neg /RH exch def                       %   X translation in decipoints
 /CW exch def                           %   Y translation in decipoints
 dup                                    %   Rotation in degrees
 PDfont.Normal exch scalefont           %   Font size in decipoints
 /NF exch def                           %   Character width in decipoints
 PDfont.Bold exch scalefont             %   Row spacing in decipoints
 /BF exch def                           % The transformations are applied
 0.1 dup scale                          % in the order: scale to decipoints,
 rotate                                 % given rotation, given translation.
 translate
} bind def

/EndPage {                              % End of page routine. No stack
 restore                                % requirements or effects.
 showpage
} bind def

/S {                                    % Routine to print a string at a
 CW mul exch RH mul moveto              % given character position.
 show                                   % - expects string, row number,
} bind def                              %   character number on the stack.

/B {BF setfont S} bind def              % Like "S", but first set bold font

/N {NF setfont S} bind def              % Like "S", but first set normal font

/T {TF setfont S} bind def              % Like "S", but first set title font

% Font setup code

/ChkCh {
 dup Encoding exch get
 dup /.notdef eq {
  pop Encoding exch /ellipsis put
 }{
  CharStrings exch known {pop} {Encoding exch /ellipsis put} ifelse
 } ifelse
} bind def

/FF {
 findfont begin
  currentdict dup maxlength 1 add dict begin
   {1 index /FID ne {def} {pop pop} ifelse} forall
   /Encoding Latin1Enc 256 array copy def
   /Metrics 1 dict def
   Metrics /.notdef 0 put
% Possible change: Delete or comment out the following line if you
% want undefined PostScript characters to generate errors rather than
% generate an ellipsis.
   0 1 255 /ChkCh load for
   dup currentdict
  end
 end
 definefont def
} bind def

/PDfont.Normal /Courier FF
/PDfont.Bold /Courier-Bold FF

/TF PDfont.Bold 100 scalefont def
00000000  25 20 3e 20 3c 50 44 72  69 76 65 72 24 44 69 72  |% > <PDriver$Dir|
00000010  3e 2e 50 53 74 70 72 6f  6c 6f 67 0a 25 20 50 6f  |>.PStprolog.% Po|
00000020  73 74 53 63 72 69 70 74  20 70 72 6f 6c 6f 67 75  |stScript prologu|
00000030  65 20 66 69 6c 65 20 66  6f 72 20 73 69 6d 70 6c  |e file for simpl|
00000040  65 20 74 65 78 74 20 70  72 69 6e 74 69 6e 67 0a  |e text printing.|
00000050  25 20 56 65 72 73 69 6f  6e 20 31 2e 30 30 2c 20  |% Version 1.00, |
00000060  66 69 72 73 74 20 75 73  65 64 20 77 69 74 68 20  |first used with |
00000070  76 65 72 73 69 6f 6e 20  31 2e 30 33 20 6f 66 20  |version 1.03 of |
00000080  74 68 65 20 21 50 72 69  6e 74 65 72 50 53 20 61  |the !PrinterPS a|
00000090  70 70 6c 69 63 61 74 69  6f 6e 0a 0a 2f 53 74 61  |pplication../Sta|
000000a0  72 74 50 61 67 65 20 7b  20 20 20 20 20 20 20 20  |rtPage {        |
000000b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000000c0  20 20 20 20 25 20 53 74  61 72 74 20 6f 66 20 70  |    % Start of p|
000000d0  61 67 65 20 72 6f 75 74  69 6e 65 2e 20 57 61 6e  |age routine. Wan|
000000e0  74 73 20 74 68 65 0a 20  73 61 76 65 20 37 20 31  |ts the. save 7 1|
000000f0  20 72 6f 6c 6c 20 20 20  20 20 20 20 20 20 20 20  | roll           |
00000100  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 25  |               %|
00000110  20 66 6f 6c 6c 6f 77 69  6e 67 20 76 61 6c 75 65  | following value|
00000120  73 20 6f 6e 20 74 68 65  20 73 74 61 63 6b 3a 0a  |s on the stack:.|
00000130  20 6e 65 67 20 2f 52 48  20 65 78 63 68 20 64 65  | neg /RH exch de|
00000140  66 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |f               |
00000150  20 20 20 20 20 20 20 20  25 20 20 20 58 20 74 72  |        %   X tr|
00000160  61 6e 73 6c 61 74 69 6f  6e 20 69 6e 20 64 65 63  |anslation in dec|
00000170  69 70 6f 69 6e 74 73 0a  20 2f 43 57 20 65 78 63  |ipoints. /CW exc|
00000180  68 20 64 65 66 20 20 20  20 20 20 20 20 20 20 20  |h def           |
00000190  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001a0  25 20 20 20 59 20 74 72  61 6e 73 6c 61 74 69 6f  |%   Y translatio|
000001b0  6e 20 69 6e 20 64 65 63  69 70 6f 69 6e 74 73 0a  |n in decipoints.|
000001c0  20 64 75 70 20 20 20 20  20 20 20 20 20 20 20 20  | dup            |
000001d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000001e0  20 20 20 20 20 20 20 20  25 20 20 20 52 6f 74 61  |        %   Rota|
000001f0  74 69 6f 6e 20 69 6e 20  64 65 67 72 65 65 73 0a  |tion in degrees.|
00000200  20 50 44 66 6f 6e 74 2e  4e 6f 72 6d 61 6c 20 65  | PDfont.Normal e|
00000210  78 63 68 20 73 63 61 6c  65 66 6f 6e 74 20 20 20  |xch scalefont   |
00000220  20 20 20 20 20 20 20 20  25 20 20 20 46 6f 6e 74  |        %   Font|
00000230  20 73 69 7a 65 20 69 6e  20 64 65 63 69 70 6f 69  | size in decipoi|
00000240  6e 74 73 0a 20 2f 4e 46  20 65 78 63 68 20 64 65  |nts. /NF exch de|
00000250  66 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |f               |
00000260  20 20 20 20 20 20 20 20  20 20 20 20 25 20 20 20  |            %   |
00000270  43 68 61 72 61 63 74 65  72 20 77 69 64 74 68 20  |Character width |
00000280  69 6e 20 64 65 63 69 70  6f 69 6e 74 73 0a 20 50  |in decipoints. P|
00000290  44 66 6f 6e 74 2e 42 6f  6c 64 20 65 78 63 68 20  |Dfont.Bold exch |
000002a0  73 63 61 6c 65 66 6f 6e  74 20 20 20 20 20 20 20  |scalefont       |
000002b0  20 20 20 20 20 20 25 20  20 20 52 6f 77 20 73 70  |      %   Row sp|
000002c0  61 63 69 6e 67 20 69 6e  20 64 65 63 69 70 6f 69  |acing in decipoi|
000002d0  6e 74 73 0a 20 2f 42 46  20 65 78 63 68 20 64 65  |nts. /BF exch de|
000002e0  66 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |f               |
000002f0  20 20 20 20 20 20 20 20  20 20 20 20 25 20 54 68  |            % Th|
00000300  65 20 74 72 61 6e 73 66  6f 72 6d 61 74 69 6f 6e  |e transformation|
00000310  73 20 61 72 65 20 61 70  70 6c 69 65 64 0a 20 30  |s are applied. 0|
00000320  2e 31 20 64 75 70 20 73  63 61 6c 65 20 20 20 20  |.1 dup scale    |
00000330  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000340  20 20 20 20 20 20 25 20  69 6e 20 74 68 65 20 6f  |      % in the o|
00000350  72 64 65 72 3a 20 73 63  61 6c 65 20 74 6f 20 64  |rder: scale to d|
00000360  65 63 69 70 6f 69 6e 74  73 2c 0a 20 72 6f 74 61  |ecipoints,. rota|
00000370  74 65 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |te              |
00000380  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000390  20 20 20 25 20 67 69 76  65 6e 20 72 6f 74 61 74  |   % given rotat|
000003a0  69 6f 6e 2c 20 67 69 76  65 6e 20 74 72 61 6e 73  |ion, given trans|
000003b0  6c 61 74 69 6f 6e 2e 0a  20 74 72 61 6e 73 6c 61  |lation.. transla|
000003c0  74 65 0a 7d 20 62 69 6e  64 20 64 65 66 0a 0a 2f  |te.} bind def../|
000003d0  45 6e 64 50 61 67 65 20  7b 20 20 20 20 20 20 20  |EndPage {       |
000003e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000003f0  20 20 20 20 20 20 20 25  20 45 6e 64 20 6f 66 20  |       % End of |
00000400  70 61 67 65 20 72 6f 75  74 69 6e 65 2e 20 4e 6f  |page routine. No|
00000410  20 73 74 61 63 6b 0a 20  72 65 73 74 6f 72 65 20  | stack. restore |
00000420  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 25  |               %|
00000440  20 72 65 71 75 69 72 65  6d 65 6e 74 73 20 6f 72  | requirements or|
00000450  20 65 66 66 65 63 74 73  2e 0a 20 73 68 6f 77 70  | effects.. showp|
00000460  61 67 65 0a 7d 20 62 69  6e 64 20 64 65 66 0a 0a  |age.} bind def..|
00000470  2f 53 20 7b 20 20 20 20  20 20 20 20 20 20 20 20  |/S {            |
00000480  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000490  20 20 20 20 20 20 20 20  25 20 52 6f 75 74 69 6e  |        % Routin|
000004a0  65 20 74 6f 20 70 72 69  6e 74 20 61 20 73 74 72  |e to print a str|
000004b0  69 6e 67 20 61 74 20 61  0a 20 43 57 20 6d 75 6c  |ing at a. CW mul|
000004c0  20 65 78 63 68 20 52 48  20 6d 75 6c 20 6d 6f 76  | exch RH mul mov|
000004d0  65 74 6f 20 20 20 20 20  20 20 20 20 20 20 20 20  |eto             |
000004e0  20 25 20 67 69 76 65 6e  20 63 68 61 72 61 63 74  | % given charact|
000004f0  65 72 20 70 6f 73 69 74  69 6f 6e 2e 0a 20 73 68  |er position.. sh|
00000500  6f 77 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |ow              |
00000510  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000520  20 20 20 20 20 25 20 2d  20 65 78 70 65 63 74 73  |     % - expects|
00000530  20 73 74 72 69 6e 67 2c  20 72 6f 77 20 6e 75 6d  | string, row num|
00000540  62 65 72 2c 0a 7d 20 62  69 6e 64 20 64 65 66 20  |ber,.} bind def |
00000550  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000560  20 20 20 20 20 20 20 20  20 20 20 20 20 25 20 20  |             %  |
00000570  20 63 68 61 72 61 63 74  65 72 20 6e 75 6d 62 65  | character numbe|
00000580  72 20 6f 6e 20 74 68 65  20 73 74 61 63 6b 2e 0a  |r on the stack..|
00000590  0a 2f 42 20 7b 42 46 20  73 65 74 66 6f 6e 74 20  |./B {BF setfont |
000005a0  53 7d 20 62 69 6e 64 20  64 65 66 20 20 20 20 20  |S} bind def     |
000005b0  20 20 20 20 20 20 20 20  20 25 20 4c 69 6b 65 20  |         % Like |
000005c0  22 53 22 2c 20 62 75 74  20 66 69 72 73 74 20 73  |"S", but first s|
000005d0  65 74 20 62 6f 6c 64 20  66 6f 6e 74 0a 0a 2f 4e  |et bold font../N|
000005e0  20 7b 4e 46 20 73 65 74  66 6f 6e 74 20 53 7d 20  | {NF setfont S} |
000005f0  62 69 6e 64 20 64 65 66  20 20 20 20 20 20 20 20  |bind def        |
00000600  20 20 20 20 20 20 25 20  4c 69 6b 65 20 22 53 22  |      % Like "S"|
00000610  2c 20 62 75 74 20 66 69  72 73 74 20 73 65 74 20  |, but first set |
00000620  6e 6f 72 6d 61 6c 20 66  6f 6e 74 0a 0a 2f 54 20  |normal font../T |
00000630  7b 54 46 20 73 65 74 66  6f 6e 74 20 53 7d 20 62  |{TF setfont S} b|
00000640  69 6e 64 20 64 65 66 20  20 20 20 20 20 20 20 20  |ind def         |
00000650  20 20 20 20 20 25 20 4c  69 6b 65 20 22 53 22 2c  |     % Like "S",|
00000660  20 62 75 74 20 66 69 72  73 74 20 73 65 74 20 74  | but first set t|
00000670  69 74 6c 65 20 66 6f 6e  74 0a 0a 25 20 46 6f 6e  |itle font..% Fon|
00000680  74 20 73 65 74 75 70 20  63 6f 64 65 0a 0a 2f 43  |t setup code../C|
00000690  68 6b 43 68 20 7b 0a 20  64 75 70 20 45 6e 63 6f  |hkCh {. dup Enco|
000006a0  64 69 6e 67 20 65 78 63  68 20 67 65 74 0a 20 64  |ding exch get. d|
000006b0  75 70 20 2f 2e 6e 6f 74  64 65 66 20 65 71 20 7b  |up /.notdef eq {|
000006c0  0a 20 20 70 6f 70 20 45  6e 63 6f 64 69 6e 67 20  |.  pop Encoding |
000006d0  65 78 63 68 20 2f 65 6c  6c 69 70 73 69 73 20 70  |exch /ellipsis p|
000006e0  75 74 0a 20 7d 7b 0a 20  20 43 68 61 72 53 74 72  |ut. }{.  CharStr|
000006f0  69 6e 67 73 20 65 78 63  68 20 6b 6e 6f 77 6e 20  |ings exch known |
00000700  7b 70 6f 70 7d 20 7b 45  6e 63 6f 64 69 6e 67 20  |{pop} {Encoding |
00000710  65 78 63 68 20 2f 65 6c  6c 69 70 73 69 73 20 70  |exch /ellipsis p|
00000720  75 74 7d 20 69 66 65 6c  73 65 0a 20 7d 20 69 66  |ut} ifelse. } if|
00000730  65 6c 73 65 0a 7d 20 62  69 6e 64 20 64 65 66 0a  |else.} bind def.|
00000740  0a 2f 46 46 20 7b 0a 20  66 69 6e 64 66 6f 6e 74  |./FF {. findfont|
00000750  20 62 65 67 69 6e 0a 20  20 63 75 72 72 65 6e 74  | begin.  current|
00000760  64 69 63 74 20 64 75 70  20 6d 61 78 6c 65 6e 67  |dict dup maxleng|
00000770  74 68 20 31 20 61 64 64  20 64 69 63 74 20 62 65  |th 1 add dict be|
00000780  67 69 6e 0a 20 20 20 7b  31 20 69 6e 64 65 78 20  |gin.   {1 index |
00000790  2f 46 49 44 20 6e 65 20  7b 64 65 66 7d 20 7b 70  |/FID ne {def} {p|
000007a0  6f 70 20 70 6f 70 7d 20  69 66 65 6c 73 65 7d 20  |op pop} ifelse} |
000007b0  66 6f 72 61 6c 6c 0a 20  20 20 2f 45 6e 63 6f 64  |forall.   /Encod|
000007c0  69 6e 67 20 4c 61 74 69  6e 31 45 6e 63 20 32 35  |ing Latin1Enc 25|
000007d0  36 20 61 72 72 61 79 20  63 6f 70 79 20 64 65 66  |6 array copy def|
000007e0  0a 20 20 20 2f 4d 65 74  72 69 63 73 20 31 20 64  |.   /Metrics 1 d|
000007f0  69 63 74 20 64 65 66 0a  20 20 20 4d 65 74 72 69  |ict def.   Metri|
00000800  63 73 20 2f 2e 6e 6f 74  64 65 66 20 30 20 70 75  |cs /.notdef 0 pu|
00000810  74 0a 25 20 50 6f 73 73  69 62 6c 65 20 63 68 61  |t.% Possible cha|
00000820  6e 67 65 3a 20 44 65 6c  65 74 65 20 6f 72 20 63  |nge: Delete or c|
00000830  6f 6d 6d 65 6e 74 20 6f  75 74 20 74 68 65 20 66  |omment out the f|
00000840  6f 6c 6c 6f 77 69 6e 67  20 6c 69 6e 65 20 69 66  |ollowing line if|
00000850  20 79 6f 75 0a 25 20 77  61 6e 74 20 75 6e 64 65  | you.% want unde|
00000860  66 69 6e 65 64 20 50 6f  73 74 53 63 72 69 70 74  |fined PostScript|
00000870  20 63 68 61 72 61 63 74  65 72 73 20 74 6f 20 67  | characters to g|
00000880  65 6e 65 72 61 74 65 20  65 72 72 6f 72 73 20 72  |enerate errors r|
00000890  61 74 68 65 72 20 74 68  61 6e 0a 25 20 67 65 6e  |ather than.% gen|
000008a0  65 72 61 74 65 20 61 6e  20 65 6c 6c 69 70 73 69  |erate an ellipsi|
000008b0  73 2e 0a 20 20 20 30 20  31 20 32 35 35 20 2f 43  |s..   0 1 255 /C|
000008c0  68 6b 43 68 20 6c 6f 61  64 20 66 6f 72 0a 20 20  |hkCh load for.  |
000008d0  20 64 75 70 20 63 75 72  72 65 6e 74 64 69 63 74  | dup currentdict|
000008e0  0a 20 20 65 6e 64 0a 20  65 6e 64 0a 20 64 65 66  |.  end. end. def|
000008f0  69 6e 65 66 6f 6e 74 20  64 65 66 0a 7d 20 62 69  |inefont def.} bi|
00000900  6e 64 20 64 65 66 0a 0a  2f 50 44 66 6f 6e 74 2e  |nd def../PDfont.|
00000910  4e 6f 72 6d 61 6c 20 2f  43 6f 75 72 69 65 72 20  |Normal /Courier |
00000920  46 46 0a 2f 50 44 66 6f  6e 74 2e 42 6f 6c 64 20  |FF./PDfont.Bold |
00000930  2f 43 6f 75 72 69 65 72  2d 42 6f 6c 64 20 46 46  |/Courier-Bold FF|
00000940  0a 0a 2f 54 46 20 50 44  66 6f 6e 74 2e 42 6f 6c  |../TF PDfont.Bol|
00000950  64 20 31 30 30 20 73 63  61 6c 65 66 6f 6e 74 20  |d 100 scalefont |
00000960  64 65 66 0a                                       |def.|
00000964
!PrinterPS/PStprolog.m0
!PrinterPS/PStprolog.m1
!PrinterPS/PStprolog.m2
!PrinterPS/PStprolog.m4
!PrinterPS/PStprolog.m5