multi tray

atze ott at abanet.ch
Wed Feb 17 05:59:02 PST 2010


> atze wrote:
>
> >> atze wrote:
> >>
> >> >> atze wrote:
> >> >>
> >> >> >> atze wrote:
> >> >> >>
> >> >> >> > hi,
> >> >> >> > I didn't find anything in the api - is it possible to switch the
> >> >> >> > printer tray within a printjob? Is there another way to do that?
> >> >> >> > greets, andreas.
> >> >> >>
> >> >> >> Yes, but there is no CUPS API to do that. You need to insert the
> >> >> >> respective statements into the job data at the proper posotion(s),
> >> >> >> preferably just before the page where it is to get active.
> >> >> >>
> >> >> >> Helge
> >> >> >>
> >> >> > Helge, thank you for you fast answer. Just to fill in some missing
> >> >> > gaps - If I want to print a pdf to different trays, I have to filter
> >> >> > it to ps myself and then add the appropriate ps commands in the ps,
> >> >> > right?
> >> >> Yes, but see the note below.
> >> >> >
> >> >> > Somehow this didn't seem to work - am I missing something? Do you
> >> >> > maybe have a simple 2 page ps that does that? atze.
> >> >> >
> >> >> > %%BeginPageSetup
> >> >> > %
> >> >> > [{
> >> >> > %%BeginFeature: *InputSlot Upper
> >> >> > << /MediaPosition 3 >> setpagedevice
> >> >> > %%EndFeature
> >> >> > } stopped cleartomark
> >> >> > %%EndPageSetup
> >> >>
> >> >> You may make use of the standard filtering by CUPS and insert the
> >> >> special statements by a special filter, say, trayfilter, and force
> >> >> this filter to be called as the very last filter by inserting the line
> >> >> *cupsFilter: "application/vnd.cups-postscript 0 trayfilter"
> >> >> into the PPD (near the beginning, around the general printer
> >> >> properties).
> >> >>
> >> >> Helge
> >> >>
> >> > thank you for pointing this out - sounds like a nice way to handle
> >> > this.
> >> >
> >> > Right now I am still having trouble to make a ps file that really
> >> > prints on 2 trays. The lines above were copied from a former post - but
> >> > they don't seem to work for me. My printer is a hp4000 laserjet with
> >> > the following media:
> >> >
> >> > InputSlot/Media Source: *Auto Upper Middle Lower LargeCapacity Envelope
> >> >
> >>
> >> Look into the printer's PPD for the respective PostScript statements.
> >> Presumably (at least in the Laserjet 4000 PPD I have) the media position
> >> is as follows:
> >>
> >> Tray		/MediaPosition
> >> -------------------------------------------------------------
> >> Upper		3
> >> Middle		2
> >> Lower		1
> >> LargeCapacity	4
> >> Envelope		2
> >>
> >> The "Auto" entry is, AFAIK, a pecuilarity from CUPS 1.1.x and probably
> >> has an empty value.
> >>
> >> Helge
> >>
> >>
> > I am a little confused:
> > lp -o media=middle test.ps
> > will work - paper is printed from the middle tray
> >
> > but having the above in the ps wouldn't do the trick (Medaiposition should
> > be ok) if I do this: lp test.ps
> >
> > Am I missing something? Strange enough printing from openoffice works.
> > andreas.
>
> Sorry, I made a typo. From my instance of the Laserjet 4000 PPD
> the middle tray (tray 2) has the media position 0.
>
> Helge
>
helge you are right - thanks again. But still this didn't change anything :(

So I wrote a perl filter to copy the file away for comparison. Even tho the feature is in the original ps file it's only in the copied file (after last filter) if I use the '-o media=middle" option on commandline.

Somewhere this info seems to get stripped....
greets, andreas.





More information about the cups-devel mailing list