Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #3220

Re: on paper tray selection

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: on paper tray selection
Date 2018-01-19 15:46 +0000
Message-ID <MPG.34cc231de38863ec989923@usenet.plus.net> (permalink)
References <eli$1801171916@qz.little-neck.ny.us> <MPG.34ca9e01b8ce0da1989920@usenet.plus.net> <p3qn7a$5k4$1@dont-email.me> <eli$1801181424@qz.little-neck.ny.us> <MPG.34cbc59b69c27671989922@usenet.plus.net>

Show all headers | View raw


In article <MPG.34cbc59b69c27671989922@usenet.plus.net>, ken@spamcop.net 
says...

> I'll see if I can come up with a program to print the key/value pairs 
> from the InputAttributes dictionary.

This will print multiple pages, for me on Ghostscript it prints 5 pages, 
it may be more or less on your printer. After this its going to be a 
case of experimentation to see what works.

%!

/KensDict 10 dict dup begin def
currentpagedevice /PageSize get aload pop
/TopY exch 10 sub def
/TopX exch def
/CurrentY TopY def
/CurrentX 5 def
/Nesting 0 def
/ScratchString 256 string def

/Helvetica findfont 10 scalefont setfont

/CheckLine {
  CurrentY 20 lt {
    showpage
    /CurrentY TopY def
    CurrentX CurrentY moveto
  } if
} bind def

/dumpdict {
  CheckLine
  CurrentX CurrentY moveto (<<) show
  /CurrentY CurrentY 10 sub def
  /Nesting Nesting 1 add def
  /CurrentX CurrentX 5 add def
  {
     exch
     CurrentX CurrentY moveto
     ScratchString cvs dup show stringwidth pop CurrentX add 5 add 
CurrentY moveto
     dup type /dicttype eq {
       /CurrentY CurrentY 10 sub def
       dumpdict
     }{
       dup type dup /arraytype eq exch /packedarraytype eq or{
         /CurrentY CurrentY 10 sub def
         dumparray
       }{
         CheckLine
         dup type /stringtype ne {
         ScratchString cvs
         } if
         show
         /CurrentY CurrentY 10 sub def
       } ifelse
     } ifelse
  } forall
  /Nesting Nesting 1 sub def
  /CurrentX CurrentX 5 sub def
  CheckLine
  CurrentX CurrentY moveto (>>) show
  /CurrentY CurrentY 10 sub def
}def

/dumparray {
  CheckLine
  /Nesting Nesting 1 add def
  CurrentX CurrentY moveto ([) show
  {
    dup type /dicttype eq {
      dumpdict
    }{
      dup type dup /arraytype eq exch /packedarraytype eq or{
        dumparray
      }{
         dup type /stringtype ne {
           ScratchString cvs
         }if
         show ( ) show
      } ifelse
    } ifelse
  } forall
  (]) show
  /Nesting Nesting 1 sub def
  /CurrentY CurrentY 10 sub def
}def

currentpagedevice dumpdict
end

showpage

Back to comp.lang.postscript | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-18 00:39 +0000
  Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-18 12:06 +0000
    Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-18 14:06 +0000
    Re: on paper tray selection Martin Leese <please@see.Web.for.e-mail.INVALID> - 2018-01-18 10:57 -0700
      Re: on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-18 19:24 +0000
        Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-19 09:07 +0000
          Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-19 15:46 +0000
            Re: on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-19 18:26 +0000
              Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-20 09:15 +0000
            Re: on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-19 19:24 +0000
              Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-20 09:32 +0000
          Re: on paper tray selection Martin Leese <please@see.Web.for.e-mail.INVALID> - 2018-01-19 10:55 -0700
            Re: on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-19 18:33 +0000
              Re: on paper tray selection ken <ken@spamcop.net> - 2018-01-20 09:18 +0000
  Re: on paper tray selection jdaw1 <jdawiseman@gmail.com> - 2018-01-21 04:44 -0800
    Re: on paper tray selection Martin Leese <please@see.Web.for.e-mail.INVALID> - 2018-01-23 10:17 -0700
      Re: on paper tray selection Eli the Bearded <*@eli.users.panix.com> - 2018-01-26 17:55 +0000

csiph-web