home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / NextPrinter / Drivers / NXNLPDriver / PageSizePolicy.ps < prev   
Text File  |  1995-04-12  |  950b  |  26 lines

  1. %!
  2. % NeXT PageSize Policy for laser printer:
  3. % If page size of job is smaller than the paper in the tray, it is centered on
  4. % the tray paper.
  5.  
  6. % This implementation works only on:
  7. % a. Printers with a single tray.  The code depends on finding the paper size in
  8. %    InputAttributes slot 0.
  9. % b. NeXT printers.  The code for rule 3 assumes the image has not been centered
  10. %    by PostScript due to a bug in NeXTSTEP 3.x.
  11. % c. Printers that center the paper in the paper path.  It isn't useful for
  12. %    printers that feed paper on the left-hand side.
  13.  
  14. << /Policies << /PageSize 5 /PolicyReport {
  15.     dup /PageSize known {/PageSize get 5 eq} {pop false} ifelse {
  16.     mark
  17.     currentpagedevice /PageSize get aload pop 2 copy gt {exch} if
  18.     currentpagedevice /InputAttributes get 0 get /PageSize get aload pop
  19.     3 -1 roll exch 4 copy
  20.     lt 3 1 roll lt and {
  21.         sub neg 3 1 roll sub neg 2 div exch translate
  22.     } if
  23.     cleartomark
  24.     } bind if
  25. } >> >> setpagedevice
  26.