Operating System - HP-UX
1834052 Members
2714 Online
110063 Solutions
New Discussion

add form feed to printer definition in our application

 
SOLVED
Go to solution
Nick D'Angelo
Super Advisor

add form feed to printer definition in our application

Gurus,

I have a HPUX11i system with an Epson FX890 with a built in Epson Lan connection and I need to configure my system to followup the print job with a form feed.

The ERP application support people say that it is an Epson issue, however, Epson, says it is a Unix issue and around and around we go...

My current setup is as follows:

80-Col Start Ctrl; /018
132-Col Start Ctrl: /015
Reset Ctrl: /018
Reset Command: /012

Any suggestions?
Always learning
6 REPLIES 6
A. Clay Stephenson
Acclaimed Contributor

Re: add form feed to printer definition in our application

You aren't going to like my answer but unless you change the question there's no much you can do. The Epson network adapter uses the LPR/LPD protocol and that makes it a "Remote" printer from HP-UX's perspective. The options available to lpr (actually rlp) are very limited; it's really the job of the application to issue the FF.

Now, if you are willing to change the question to I have an EPson FX-890 connected to an external JetDirect (the printer and external JetDirect are connected via a parallel cable) then you have a problem that can be easily solved by simply adding editing the printer interface file. Using JetDirect, you now have a "Network" printer in HP-UX speak and you have full control over it.
If it ain't broke, I can fix that.
Nick D'Angelo
Super Advisor

Re: add form feed to printer definition in our application

Clay,

Thanks for your answer and for confirming my original belief.

Seeing as we are on a Windozzzze network/environment mainly, I will pass onto them.

I have been asking to be involved for a couple of year prior to purchasing any hardware that will be connected to the HPUX environment.

I hope this will provide the necessary justification to get me involved from the outset and not have to scramble after the printer has already been ordered and installed at our remote site.

Thanks again.
Always learning
RAC_1
Honored Contributor

Re: add form feed to printer definition in our application

I do not know much about this. But how about formatting the print outout with pr before sending it to the printer??

Ream man page of pr fr details. Option -F looks helpful, not sure though.

Anil
There is no substitute to HARDWORK
Nick D'Angelo
Super Advisor

Re: add form feed to printer definition in our application

Gents,

I have another printer with the same problem, an OKIdata impact printer, however it is configured via an External HP Jetdirect unit.

How would I go about editing the printer interface file?

What should I be looking for?

Thanks again.
Always learning
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: add form feed to printer definition in our application

Find the interface file in /var/spool/lp/interface (or in the model.orig directory) just below /var/spool/lp/interface) that corresponds to your print queue.

There will be a line that invokes hpnpf (the command that actually sends the output stream to the JetDirect port).

It will look something like this:

for XFILE in ${files}
do
cat ${XFILE} | ${HPNPF}/bin/hpnpf -x myprinter -
done

You need to make a small modification:

TDIR=${TMPDIR:-/var/tmp}
T1=${TDIR}/X${$}_1.tmp

echo "\014\c" > ${T1}
for XFILE in ${files}
do
cat ${XFILE} ${T1} | ${HPNPF}/bin/hpnpf -x myprinter -
done

rm -f ${T1}

Using this technique, you can create a temp file that is sent both before and after a job if you wish to, for example, use a different pitch. You could set up a queue for 10CPI as well as condensed print.
If it ain't broke, I can fix that.
Nick D'Angelo
Super Advisor

Re: add form feed to printer definition in our application

All,

We re-connected the HP External Jetdiret box and voila, all is fine without even having to modify any printer codes.

Thanks again.
Always learning