Path: csiph.com!news.mixmin.net!border2.nntp.ams1.giganews.com!border1.nntp.ams1.giganews.com!nntp.giganews.com!buffer1.nntp.ams1.giganews.com!buffer2.nntp.ams1.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Sat, 20 Jan 2018 03:32:32 -0600 From: ken Newsgroups: comp.lang.postscript Subject: Re: on paper tray selection Date: Sat, 20 Jan 2018 09:32:17 -0000 Message-ID: References: Reply-To: ken@spamcop.net MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit User-Agent: MicroPlanet-Gravity/3.0.4 X-Antivirus: Avast (VPS 180119-0, 19/01/2018), Outbound message X-Antivirus-Status: Clean Lines: 119 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-sKZrTP+gKa6A/3JYVyg6NMtSAx7EjCq3NXdI9Ggcl6pr9zkcG3WjS+/eZGf3CnkOmNOx5FTKg6sA+ND!St7yVv7y1Qb0nrRdEYVgCKbcTIPiOSqjvpeoD58mxdqrThK6INVeG7MAlS9PWqLbEJt3tkGjC6ra!tgDPM3iyx5Z1Poc= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4285 Xref: csiph.com comp.lang.postscript:3227 In article , *@eli.users.panix.com says... > I got two pages of output, with one line in the middle of one them > overwritten several times. Reading it, maybe an array of arrays triggers > that? But overall it's a pretty cool program. An array of arrays is supposed to just dump the array, but I think I forgot to trigger a newline, so yeah that seems likely. Drat. > The long line appears to be an array called "Install", so probably not > too interesting anyway. That's fortunate, all that does is contain procedures (packedaaray type) to set certain device-dependent graphics-state parameters. Most likely you can ignore everything there. > The InputAttributes dictionary is empty. Previous to running this, I > hadn't realized InputAttributes was a dictionary inside of > currentpagedevice. I know only a little Postscript programming. Well that's pretty sucky really. So the printer hardware isn't telling the PostScript interpreter anything at all that it knows about its configuration :-( > > All of the straight out of currentpagedevice Media* settings show up > as "--nostringval--". They are: > > MediaPosition > MediaType > MediaColor > MediaWeight > > Also, possibly relevant, OutputType is "--nostringval--". > > In the Policies dictionary: > > << > MediaWeight 1 > PolicyReport > [pop ] > OutputDevice 0 > PageSize 0 > InputAttributes 1 > PolicyNotFound 1 > MediaType 1 > MediaColor 1 > >> > > And there's a > > DeferredMediaSelection true > > I'm going to guess all that means media (weight|type|color) can be used > to select a tray, but not media position. Probably not, no. With InputAttributes being empty there's no (standard) way for a PostScript interpreter to select amongst different media. The interpreter thinks it only has one. The only think I can suggest is brute-force experimentation. I'm not clear how, at the moment, you switch between selecting media from the paper tray, the manual feed, envelopes and your label printer. I guess I don't need to worry about envelopes and labels. Are you pressing buttons on the front panel or something ? The obvious thing to do is send something like this: %! << /MediaPosition 0 >> setpagedevice showpage << /MediaPosition 1 >> setpagedevice showpage << /MediaPosition 2 >> setpagedevice showpage and see where the printer pulls media from. Duplex is easy, that's absolutely standard: %! << /Duplex false >> setpagedevice showpage So you might want to combine those as: %! << /Duplex false /MediaPosition 0 >> setpagedevice showpage ..... If the printer pulls from different trays you can probably work out how to control it. If it doesn't then I'm forced to assume that Brother simply doesn't want to let you control the tray selection from PostScript. Which would, of course, explain the empty entries in the PPD...... Ken