Operating System - HP-UX
1822144 Members
3502 Online
109640 Solutions
New Discussion юеВ

multiple printers on the same queue

 
Kyle Links
New Member

multiple printers on the same queue

Can anyone assist me in printing the same document to two (or 3) different
printers at the same time. Your assistance is greatly appreciated.

Simplest question of the day,
---Kyle
4 REPLIES 4
Karim Hachimi_1
New Member

Re: multiple printers on the same queue

Hi
You can just write a script and print using it
it can be verry simple like this

lp -dprinter1 $1
lp -dprinter2 $1
lp -dprinter3 $1

you willprint the file in all printers you define
Kyle Links
New Member

Re: multiple printers on the same queue

Thanks for your input. If I'm reading your message correctly, your assuming
that I have the option of placing the job in the print queue. Unfortunately, I
don't. The job is placed into the print queue by an application. If I can
customize the app. to accept a script as it's output then it may work. Thanks
again and any other tips are appeciated.
---Kyle
Moe Patches
New Member

Re: multiple printers on the same queue

Kyle,

How are the printers set up? Are these set up through JetAdmin (network
printer) or as a Remote printer or are they local printers?

I was able to modify one of the model scripts. Here is my example:

I have defined two printers via JetAdmin:

printer1
printer2

I decided to modify "printer1" to also send a job to "printer2" as well. We
added the following line to the /etc/lp/interface/printer1 file:

. . .
#
# Save the stderr messages in a temporary log file
# and discard stdout which is the peripheral output.
$REALMODEL $job $user "$title" $copy "$options" $files | $HPNPF $HPNPFOPT
2>>$LOG > /dev/null

cat $files | /usr/bin/lp -dprinter2 <--Added this line.

retcode=$?

if [ "$retcode" -eq 0 ]
then
. . .


This has seemed to work for me. So when ever I send a print job to the print
queue "printer1" to will automatically send it to "printer2."

Good Luck!

-Moe
Kyle Links
New Member

Re: multiple printers on the same queue

Thanks for the tip! I had a mix of both Remote and JetDirect devices. This
works well for the JetDirects and I can live without the Remotes for now.
Thanks again - this works well.
---Kyle