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


Groups > comp.lang.postscript > #3215

Re: on paper tray selection

From ken <ken@spamcop.net>
Newsgroups comp.lang.postscript
Subject Re: on paper tray selection
Date 2018-01-18 12:06 +0000
Message-ID <MPG.34ca9e01b8ce0da1989920@usenet.plus.net> (permalink)
References <eli$1801171916@qz.little-neck.ny.us>

Show all headers | View raw


In article <eli$1801171916@qz.little-neck.ny.us>, *@eli.users.panix.com 
says...

> I gather there are explicit commands in PCL to do tray switches, but
> Postscript is a different beast that doesn't include printer commands,
> just page description commands. :^) 

Not quite true. PostScript the language is device-independent, so 
doesn't include operators to do things like tray switching.

However, the 'setpagedevice' operator allows you to alter features of 
the device. The problem here is that the features and capabilities of 
the device are outside the scope of the language. That said the 
PostScript Language Reference Manual has an extensive section on finding 
and setting media based on the desired attributes (See Section 6, Device 
Control).

 
> One document I found said that you should look in the PPD for the
> InputSlot lines, which should have the appropriate setpagedevice
> command.

On some devices, maybe. But that's not the way you are *supposed* to use 
the media selection abilities of PostScript. InputSlot isn't PostScript, 
its PPD, the PostScript equivalent is the 'MediaPosition' key in the 
PPD. Note that you are not really supposed to select the tray yourself, 
partly because its often the case that users can swap trays around. 
However, if you do, then the interpreter should honour the position 
request, even if its not the best option based on other criteria (see 
next 2 paragraphs).

The intention of the media selection process is that the PostScript 
interpreter is aware of the configuration of the device. What trays are 
available, the media size of each tray, the media weight etc.

You then request a particular kind of media, and the interpreter does 
its best to match your request from what it has available. Depending on 
the configuration of the interpreter it may do things like; select a 
medium and print to it, select a 'best fit' medium and print to that, 
request assistance from the operator (no suitable media available) or 
throw an error.


> So I did that, and the place where it should be is blank.
> 
>     The following lines come from the PPD file for the Ricoh cl 3000
>     printer:
>        *InputSlot MultiTray/Bypass Tray: "<</MediaPosition 0>>
>        setpagedevice"
>        *InputSlot 1Tray/Tray 1: "<</MediaPosition 1>> setpagedevice"
>        *InputSlot 2Tray/Tray 2: "<</MediaPosition 2>> setpagedevice"
>        *InputSlot 3Tray/Tray 3: "<</MediaPosition 3>> setpagedevice"
> 
> In the Brother PPD they look more like:
> 
>        *InputSlot 2Tray/Tray 2: "  "

So you (probably) can't just request a specific tray from the 
interpreter, it won't let you. This suggests that the interpreter 
 does have a lot of information available to it, and you should request 
what you want, rather than asking for a specific tray.


> Does Postscript offer ways to inspect settings that can be made with
> setpagedevice?

Not exactly. You can put anything you like in the dictionary to 
setpagedevice and the device will ignore anything it doesn't understand.

However....

You *can* ask the device what the current settings are, by using the 
'currentpagedevice' operator. That will return a dictionary with all 
kinds of interesting things in it. In particular it will (or at least 
should) return an InputAttributes dictionary.

Why is that interesting ? Because that dictionary should list the 
attributes of the available media.

Assuming that this is present, and matches what you think should be 
there, going by what's loaded in your printer, then you can send a media 
request for that medium. The interpreter should then match that request 
with the tray and print on that medium.


> Are there common standards that are likely to work for
> tray selection? (Eg, the Ricoh stuff above.)

Selecting MediaPosition is standard. The other standard keys for a media 
request are listed in the PLRM but include; PageSize (most important!), 
MediaColor, MediaWeight, MediaType, MediaClass, LeadingEdge, 
InsertSheet, ManualFeed, TraySwitch,  MediaPosition and 
DeferredMediaSelection.


> I know the printer can distinguish different paper weights, because 
the
> self-diagnostic will tell me how many pages of normal versus heavy paper
> have been printed (in my case: circa 30,000 vs none). The covers are
> a slightly heavier stock, so it would even be appropriate.

So that does indicate that the printer, and by implication the 
PostScript interpreter, know a lot about the available media and 
'probably' expect to match it based on your media request.

 
> I don't know how to assign that attribute to a particular tray and I
> don't know how to specify that in Postscript.

Like I said, you would set up a media selection request. For example;

<<
/PageSize [612 792]
/MediaColor (Blue)
/MediaWeight 37.6
/MediaPoosition 2
>> setpagedevice

Would request media which is A4, Blue, has a weight of 37.6 grams/square 
meter and is in tray 2.

The interpreter should match that against the InputAttributes of all the 
media it has available and select the 'best fit' which will usually mean 
that it will consider PageSize first, then colour (if it kows that) and 
weight. Because that request includes a MediaPosition, the interpreter 
will prefer tray position 2 if it possibly can. In that case it might 
ignore everything except the MediaSize. In ecterme cases it may even 
ignore the MediaSize and just select the specified tray (clearly you 
know what you are doing...)


> One other wrinkle: covers are simplex and interior pages are duplex.

So you would also need to add /Duplex true or /Duplex false. Of course, 
depending on the pages emitted so far this may result in a blank side on 
a Duplex print.

You may also need to set /Tumble to control whether page images are 
bottom up or top down on the obverse.

Both of these are also page device controls, along with MirrorPrint, 
NegativePrint, Margins, PageOffset, ImageShift, ImagingBBox and 
HWResolution.

Of course, not all printers will support all of these controls. Duplex 
will be ignored on a pritner without a duplexing unit for example.

There are many other device controls potentially available as standard, 
and then there are also non-standard extensions for features which 
weren't considered at the time (eg /Staple is common)

 
> Advice? Hints? Words of condolance?

Well hopefully you can now see that PostScript does in fact potentially 
boast a rich set of controls for devices. Exactly what is implemented, 
and how, is unfortunately under the control of the printer manufacturer. 
Not every manufacturer bothers to implement all the features and if I 
remember correctly Brother have their own PostScript interpreter, the 
quality of which doesn't hugely impress me.....

If I were you I would contact Brother technical support and ask *them* 
how to achieve what you want. If anyone knows they should, though I 
appreciate it can be difficult to find a suitably informed person.

BTW I can't find a Brother HL-6200DN, only a DW.....


				Ken

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


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