Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send tray select codes to HP/PCL printer in Linux

Status
Not open for further replies.

JohnLynn

Technical User
Feb 2, 2001
38
US
How would you send a tray selection escape code to a HP/PCL only printer in a print filter?

Would this be good for the complete job or just one page?

I am using RedHat 6.2 with lpr-0.50-4.


Thanks for your time.
John G. Lynn


 
John,

The trick with tray select codes is to make sure that they
are sent to the printer BEFORE there is any printable
data on the page. The same is true of page size commands.
Otherwise, the printer will eject the page from the current
tray before the change takes place.

So if you can find in your filtering script the point at
which the page size command is sent, insert your tray
select code there. Assuming this is shell script of some
kind a "letter size" command might be

\033&l2A

This assumes the use of the octal \033 for the escape.

The tray select for let's say, the 500 sheet tray
might be
\033&l5H

Once a tray is selected, it remains the current paper
source until the printer is reset at the end of the job
or another tray is selected.

Jim Asman
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top