groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] choosing paper tray


From: James H. Cloos Jr.
Subject: Re: [Groff] choosing paper tray
Date: 21 Jan 2001 16:57:43 -0600

>>>>> "Werner" == Werner LEMBERG <address@hidden> writes:

Werner> My knowledge of PS is quite limited -- if the method of
Werner> choosing a paper tray is standarized it should be not to
Werner> difficult to add a proper option to grops.  Can someone send a
Werner> (small) sample PS code to the list?

It will vary with the printers.  setpagedevice is the only likely
constant.  cups ends up adding this for selecting the first tray
on a lexmark optra s (when using lexmark's ppd file):

%%BeginFeature: InputSlot Tray1
 << /ManualFeed false /MediaPosition null >> setpagedevice
 currentpagedevice /InputAttributes get 0 get setpagedevice
 << /InputAttributes << /Priority [0] >> >> setpagedevice
 << /Policies << /PageSize 7 >> >> setpagedevice
%%EndFeature

which is exactly what is in the *InputSlot Tray1/Tray 1: "
section of the ppd.  So, this would select tray 2:

 << /ManualFeed false /MediaPosition null >> setpagedevice
 userdict /lms
 currentpagedevice /InputAttributes get 1 known { 1 }{ 0 }ifelse put
 currentpagedevice /InputAttributes get lms get setpagedevice
 << /InputAttributes << /Priority [lms] >> >> setpagedevice
 << /Policies << /PageSize 7 >> >> setpagedevice"

It is the '1' shat specifies tray 2 in that example.  3 specifies
tray3, 5 tray4, etc.


As another example, an HP LaserJet 5P/5MP uses this to select the
upper tray:

    <</DeferredMediaSelection true /MediaPosition 3>> setpagedevice

and this for the lower tray:

    <</DeferredMediaSelection true /MediaPosition 0>> setpagedevice

The HP LaserJet 5Si uses:

    <</DeferredMediaSelection true /MediaPosition 3>> setpagedevice" 

for tray 1, /MediaPosition 0 for tray 2, /MediaPosition 1 for tray 3
and /MediaPosition 4 for tray 4.

And the only way to know is to check the ppd.

Other than cups, I'm quite sure there are apps out there which can
parse the ppd, select the correct code for the options specified on
the command line, and insert it.  Such a program can be used as filter
for grops(1)'s output.  I do not, however, remember where any reside.
(I probably saw them mentioned (years ago) in comp.lang.postscript
and/or gnu.ghostscript{,.bug}.)

The black+white book goes into some detail on this in the section on
setpagedevice.  I understand adobe has a pdf of it online now.

I also cannot remember whether setpagedevice has to be run after an
exitserver....

-JimC
-- 
James H. Cloos, Jr.  <http://jhcloos.com/public_key>     1024D/ED7DAEA6 
<address@hidden>  E9E9 F828 61A4 6EA9 0F2B  63E7 997A 9F17 ED7D AEA6


reply via email to

[Prev in Thread] Current Thread [Next in Thread]