home *** CD-ROM | disk | FTP | other *** search
/ CICA 1993 August / CICA.cdr / cis_libs / mswin32 / 13 / kmhdr.ps < prev    next >
Encoding:
Text File  |  1993-01-05  |  3.6 KB  |  116 lines

  1. % This is a Postscript Preamble to be loaded before trying to print 
  2. %  the documents in \KMDESIGN in the October 1992 WIN NT DDK.
  3. % It can also be used to print just the even or odd pages, for "manual"
  4. %  duplex printing.
  5. %
  6. % Using these defintions, the documents print with a tolerable format
  7. %  although there are clearly some minor problems.  I've figured these out
  8. %  the commands by "reverse engineering" the postscript code.  
  9. %  I can't find the correct preample on the DDK disk.
  10.  
  11. %  Robert R. Howell   December 5, 1992
  12.  
  13. %  To print all           pages initialize oddpage at -1
  14. %  To print only the odd  pages initialize oddpage at  0
  15. %  To print only the even pages initialize oddpage at  1
  16.  
  17. /oddpage -1 def      % This prints all pages
  18.  
  19. % End of page.  Decide whether to print it based on oddpage.
  20. % If oddpage is -1, always print it.
  21. % If oddpage is  1, print it then set oddpage to 0.
  22. % If oddpage is  0, clear it then set oddpage to 1.
  23. /PE { oddpage -1 eq 
  24.          {  
  25.             showpage 
  26.          }
  27.          {  oddpage 1 eq 
  28.             {  showpage  /oddpage 0 def }
  29.             {  erasepage /oddpage 1 def }
  30.             ifelse
  31.          }
  32.          ifelse
  33.     }
  34.     def
  35.  
  36.  
  37. %Define an array of standard font names   
  38. %The program seems to call them by number.
  39.  
  40. % The numbering does not seem to be the "standard" postscript one.
  41. % The following seems to give tolerable results.
  42. /FNAMES 
  43. /Times-Roman 
  44. /Times-Italic
  45. /Times-Bold
  46. /Times-BoldItalic
  47. /Courier
  48. /Courier-Oblique
  49. /Courier-Bold
  50. /Courier-BoldOblique
  51. /Helvetica
  52. /Helvetica-Oblique
  53. /Helvetica-Bold
  54. /Helvetica-BoldOblique
  55. /Helvetica-Narrow
  56. /Helvetica-Narrow-Oblique
  57. /Helvetica-Narrow-Bold
  58. /Helvetica-Narrow-BoldOblique
  59. /AvantGarde-Book
  60. /AvantGarde-BookOblique
  61. /AvantGarde-Demi
  62. /AvantGarde-DemiOblique
  63. /Bookman-Light
  64. /Bookman-LightItalic
  65. /Bookman-Demi
  66. /Bookman-DemiItalic
  67. /Times-Roman 
  68. /Times-Italic
  69. /Times-Bold
  70. /Times-BoldItalic
  71. /Palatino-Roman
  72. /Palatino-Italic
  73. /Palatino-Bold
  74. /Palatino-BoldItalic
  75. /ZapfChancery-MediumItalic
  76. /Symbol
  77. /ZapfDingbats
  78. ] def
  79.  
  80. % Change fonts.  Font 60 is a Microsoft special font.  Clip to 34.
  81. % fnumber fsize SF   sets font type and size.  
  82. /SF { exch dup 34 gt {pop 34} if FNAMES exch get findfont exch 
  83.       scalefont setfont } def
  84.  
  85. % fontnumber fontsize F   sets fonts and stores values
  86. /F { /curfontsize exch def /curfont exch def
  87.      curfont       curfontsize SF } def
  88. /B { curfont 2 add curfontsize SF } def    % Bold
  89. /I { curfont 1 add curfontsize SF } def    % Italic
  90. /E { curfont       curfontsize SF } def    % End Bold or italic
  91.  
  92. /LU { } def     % Think this should start underlining.  Not implemented
  93. /LE { } def     % Think this should end   underlining.  Not implemented
  94. /LL { pop } def % Used in tables of contents.  Not sure what it does.
  95.  
  96. /PSp {     } def       % Not sure what these should do.
  97. /PSe {     } def
  98. /SFL { pop } def
  99.  
  100. % These position text on the page, then show it.
  101. /P { 15840 exch sub 20 div exch 20 div exch moveto } def  % move to twips
  102. /S { show } def
  103. /J { 20 div 0 rmoveto } def
  104.  
  105. % These position EPS graphics on the page.
  106. % The originals may also place a border around it.
  107. /JUNKDICT 1 dict def            % Create junk dictionary, needed for II2
  108. /IX { pop pop } def             % Could be for drawing border.
  109. /IS { pop pop pop pop } def     % Could be for drawing border.
  110. /II2 { gsave save currentpoint translate 0 -15840 20 div translate 
  111.        JUNKDICT begin } def     % Change origin for EPS graphics.
  112. /II1 { } def                    % Don't know what this should do.
  113. /IT  { restore grestore } def   % Restore origin after EPS graphics.
  114.  
  115.