The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
awk selection on fields amatuer_lee_3 Shell Programming and Scripting 3 05-12-2008 10:05 PM
AIX Laserjet 4+ specify tray to print to zuessh AIX 0 03-05-2008 01:42 PM
Opt out selection drhowarddrfine Post Here to Contact Site Administrators and Moderators 5 01-23-2008 10:20 PM
tray selection amit kul UNIX for Advanced & Expert Users 3 07-16-2007 05:31 AM
Changing the default print tray in Unix tnix UNIX for Dummies Questions & Answers 1 08-04-2006 02:00 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-04-2003
Registered User
 

Join Date: Nov 2003
Posts: 1
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
__________________
Avinash Shenoy
Forum Sponsor
  #2 (permalink)  
Old 11-12-2003
jsilva's Avatar
Registered User
 

Join Date: Apr 2003
Posts: 169
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.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 06:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0