1820485 Members
2365 Online
109624 Solutions
New Discussion юеВ

Printing issues

 
glenn b
Occasional Advisor

Printing issues

We have print jobs that run over night. Occasionaly a printer gets powered off or offline. Sometimes the job will print when it's turned back on other times it doesn't and there is no sign of it sitting in any queue. It's like the job just disappears like Unix thinks the printer was on the whole time. In case I can't resolve that issue, is there a way to send a job 2 places at once? One to the printer and one to a file?
4 REPLIES 4
glenn b
Occasional Advisor

Re: Printing issues

Sorry, I'm running HP-UX 11.11
A. Clay Stephenson
Acclaimed Contributor

Re: Printing issues

If this is a Network printer or local printer as opposed to a Remote printer then its fairly easy to modify the interface file in /var/spool/lp/interface/queuename (and/or the queuename file in the model.orig directory just below) to copy a file to another location. You will probably need to cxreate an output filename based upon the job id so that subsequent jobs don't overwrite the current file.
$1 = jobid
$2 = user
$3 = title
$4 = number_of_copies
$5 = options (-o nobanner -o postscript ..)
shift 5
$* now contains the filenames to be printed.
If it ain't broke, I can fix that.
Bosman, Kryno
New Member

Re: Printing issues

Maybe the use of HPDPS would solve your problem.

For more information about HPDPS, check http://docs.hp.com/en/B2355-90156/index.html
Ganesan R
Honored Contributor

Re: Printing issues

Hi,
If you send any data to the printer spooler system then you may not be able to redirect the same data to any file unless if any customised model interface for that printer.Other way we can send the data to a file first then send to the printer.

For that we need to create fileprinter.it is nothing but the printer, instead of sending to the printer device it will send the data to a file.then we can print this file.

For creating the file printer follow the steps,

# touch /tmp/printer
# chmod 644 /tmp/printer
# chown lp /tmp/printer
# lpshut
# lpadmin -pyour_printer_name -v/tmp/printer -mdumb ----> (Ex:lpadmin -pfileprinter -v/tmp/printer -mdumb)
# accept your_printer_name ---->(Ex:accept fileprinter)
# enable your_printer_name ---->(Ex:enable fileprinter)
# lpsched

If you give #lp -dfileprinter /etc/inittab command it will append the data to the file /tmp/printer.

Now you can print this /tmp/printer to the actual printer device by issuing the command,

#lp -d /tmp/printer
Best wishes,

Ganesh.