multi tray

Helge Blischke h.blischke at acm.org
Wed Feb 17 02:37:47 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





More information about the cups-devel mailing list