%% Tray Select Definition
%% File: TrayPs

/inch { 72 mul } bind def
/largepaperarray [ /b4 /a4 ] def
/setpaper {
  dup where papertray and {
  exch get exec 
  } if
} bind def
/trayarray [ /b4tray /a4tray ] def
/settray {
  dup statusdict exch known {
  {
    statusdict begin load exec end
  } stopped {
    $error /newerror get {
      $error /errorname get /rangecheck eq {
        (Tray not found, using default tray.) print flush
        /papertray false def
      }{
        handleerror
      } ifelse
        $error /newerror false put
      } if
    } if
  }{
    pop
  } ifelse
} bind def

/papertray true def
/widtharray  [ 9.84 inch 8.27 inch ] def
/heightarray [ 13.9 inch 11.69 inch ] def
/xoffset 0 def
/yoffset 0 def
/landscape false def
/pagesetup {
  dup widtharray exch get /paperwidth exch def
  dup heightarray exch get /paperheight exch def
  dup trayarray exch get settray
  largepaperarray
  exch get setpaper
} bind def
/@b4 {0 pagesetup} def
/@a4 {1 pagesetup} def
/@manualfeed {
/manualfeed true def
statusdict /manualfeed known {
statusdict /manualfeed true put
statusdict /manualfeedtimeout 120 put
} if } bind def
/@landscape {/landscape true def} bind def

%% End of TrayPS
