Solved

Assistance writing a Printer Filter

Posted on 2000-03-20
4
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 21

Accepted Solution

by:
tfewster earned 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When you do backups in the Solaris Operating System, the file system must be inactive. Otherwise, the output may be inconsistent. A file system is inactive when it's unmounted or it's write-locked by the operating system. Although the fssnap utility…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
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…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.
Suggested Courses

738 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