tray selection using lp command


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users tray selection using lp command
# 1  
Old 11-05-2003
tray selection using lp command

I have a HP laserjet 9000 printer on a Sun Solaris server.
I try to print using lp command to different trays. But it gives an error. The command that i used is lp -dprinter_queue -otray2 file_name
# 2  
Old 11-12-2003
Hi,

See if this helps...

a. On a per job basis, specify the media to print
to either by size or by tray number:
1. By size:
lp -d<queue> -o<paper size>
where <paper size> is one of the following:
legal, letter, A3, A4, A5, A6, exec, ledger,
11x17, B4-JIS, B5-JIS, B5-ISO, B6-JIS, com10,
com10env, PostCard Single, PostCard Double,
custom, C5, C5env,
DL, DLenv, monarch
2. By tray number:
lp -d<queue> -o<tray specification>
where <tray specification> is one of the
following:
tray1, upper, ub, ubin, tray2, lower,
lb, lbin, tray3, tray4

b. To configure a default for all jobs in a
particular queue, run the following commands:
1. cd <model directory>
2. cp <queue> <queue>.tmp
3. sed -e 's/paper="def"/paper="<paper size>"/'
<queue>.tmp > <queue>
NOTE: Above command is all on one line.
4. rm <queue>.tmp
where:
<model directory> is:
/usr/spool/lp/interface/model.orig on HP-UX 9.x
/etc/lp/interface/model.orig on HP-UX 10.x
/etc/lp/interface/model.orig on HP-UX 11.x
/etc/lp/interfaces/model.orig on Solaris
<paper size> is one of the following:
legal, letter, A3, A4, A5, A6, exec, ledger,
11x17, B4-JIS, B5-JIS, B5-ISO, B6-JIS, com10,
com10env, PostCard Single, PostCard Double,
custom, C5, C5env, DL, DLenv, monarch

The above commands will set the default paper
size of the specified queue.

In short, edit /etc/lp/interfaces/model.orig/* and replace `paper="def"'
with `paper="letter"'. (Twiddle paper selection to suit your needs).
In your fav editor, searching for `paper=' drops you on the spot, or you
can sed it out as listed above.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Required Icon Tray in Linux

Hello I am using linux machine. I need Icon tray in this. "Icon Tray" contains all the icons which we open in the workspace. As such, these icons appear at the bottom (similar to windows i.e.when we open internetexplorer, Word, XLs, these icons appear in the bottom) I have to open so many... (3 Replies)
Discussion started by: nehashine
3 Replies

2. Hardware

Fan Tray for Sunfire T2000

Recently the rear fan assembly of one of our T2000 servers went faulty. I could replace it immediately with the one from a currently powered off standby machine. But now this one has to be replaced. So I got a quote from our supplier who charges EUR 776 for a new spare part or EUR 405 (all... (0 Replies)
Discussion started by: hergp
0 Replies

3. Solaris

d240 media tray is automatically restarting on sunfire 6800

d240 media tray(domain C) is which is connected to SUNFIRE 6800 (DOMAIN C),automatically restarting.remaining domains A and B are working fine..why i dont know..with out human intervention this domain is restarting automatically for 3 to 4 days in a day..plz solve this problem.why like this going... (4 Replies)
Discussion started by: tv.praveenkumar
4 Replies

4. AIX

chvirprt and tray 1

Hi, I'm not able to print on tray 1. I checked the configuration and I get these 3 options: $lsvirprt -q print1 -d hp@xprint -a _O Name Description Value _O Type of INPUT PAPER HANDLING (backward 1 ... (0 Replies)
Discussion started by: imad77
0 Replies

5. AIX

printer tray and blank separator issues

Hi, I experience some issues with my new print queues that I created in AIX (smitty). This following print queue is dedicated to print on tray 1 and the user have to put the paper manually, the jobs should be executed without separator page. But when we print on this queue, the job is executed... (1 Reply)
Discussion started by: imad77
1 Replies

6. AIX

AIX Laserjet 4+ specify tray to print to

Is it possible to specify the tray you would like to print to in AIX? We are using the laserjet 4+ driver. Thanks in advance (0 Replies)
Discussion started by: zuessh
0 Replies

7. UNIX for Advanced & Expert Users

tray selection

Hello All, Could anyone help me how to selecting the trays in unix . Thanks, Amit kul (3 Replies)
Discussion started by: amit kul
3 Replies

8. Shell Programming and Scripting

Array and Selection

I have a question: Y X Tabel a is a array multidimensional --> a(1024,20) I load in to array a Text from 6000 row where: in a(1,1) is present the row 1 of original text, in a(1024,1) is present then row 1024 of original test and in... (4 Replies)
Discussion started by: ZINGARO
4 Replies

9. UNIX for Dummies Questions & Answers

Changing the default print tray in Unix

I have a unix based app that I'm trying to print to an HP Laserjet 4050n but it keeps defaulting to Tray 1. I need it to print to Tray 3. When I print to the printer from a windows based app it prints to the correct tray specified. It was printing ok previously but I had to to a cold reset... (1 Reply)
Discussion started by: tnix
1 Replies
Login or Register to Ask a Question