?
Solved

Assistance writing a Printer Filter

Posted on 2000-03-20
4
Medium Priority
?
285 Views
Last Modified: 2013-12-06
I need to redirect print jobs to tray3 on a HP LasertJet 5si printer.  There will be a specific print queue set up so that all jobs sent to this queue will be directed to tray 3 of the HP printer, currently they default to tray 2 which contains the company letterhead.  The printer filter needs to be written in either BASH or PERL however BASH is preferred by the UNIX ADMIN.
0
Comment
Question by:markhwin
  • 3
4 Comments
 
LVL 21

Accepted Solution

by:
tfewster earned 300 total points
ID: 2639741
If you're using Solaris or HP-UX, HP printers are well supported, just do
lp ...  -o tray3 -o ...

To do this "manually" send "\033&l${mediasrc}H\c" to the printer at the start of
the print job, where mediasrc is the code for the tray (tray3=> mediasrc=4 for a
lj5si printer). If you're using PostScript, pre-pend "3 setpapertray" to the
print job instead.

To incorporate this in a printer filter/model script, if the interface/model
in /var/spool/lp is a script, it can be copied & the copy edited to fix the
paper tray options OR pre-pend these Laserjet 'commands' to the print file.
 
The print queue is then created with e.g.
lpadmin -p printername .. -i your_interface_name

If you're not using lp/Solaris/HP-UX we need to know more about what your
setup is...

Hope this helps, Tim
0
 
LVL 21

Expert Comment

by:tfewster
ID: 2661526
Any feedback yet?
0
 

Author Comment

by:markhwin
ID: 2661759
Sorry for the delay, I ended up being out of the office and away from a PC a few days after I submitted my question.  This looks good, thank you for your help.
0
 
LVL 21

Expert Comment

by:tfewster
ID: 2663218
You're welcome - If you need any more, add another comment to this question & I'll dig a bit deeper.

Cheers, Tim
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question