Operating System - HP-UX
1820261 Members
3057 Online
109622 Solutions
New Discussion юеВ

Changing font size on dot-matrix printer

 
Sunil Oza
Occasional Contributor

Changing font size on dot-matrix printer

Hi,

I have a address label which is printed on an Epson LQ-2080 dot matrix printer from Oracle Apps 11.03 on HP-UX.

These labels require a large font size. Is there anyway I can change the font size on the printer for this report by sending some escape sequences (and set it back to the normal after the job is complete) ?

Please guide.

Thanks,
Sunil.
2 REPLIES 2
A. Clay Stephenson
Acclaimed Contributor

Re: Changing font size on dot-matrix printer

You might have better luck posting your query at support.oracle.com.

Good Luck, Clay
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: Changing font size on dot-matrix printer

If you want to set up a special printer (which might be the same physical printer as another) there is a fairly simple way.

Create a new printer (e.g. myprinter). Then cd to /var/spool/lp/interface. The file you want to edit is either myprinter or model.orig/myprinter depending on the interface script you start with.

Somewhere in the interface, you will find a loop (look for $copies) where the input file
is cat'ed to a device.

You need to create a temporary file to set the printer and a temporary file to reset the printer. I don't know what the sequences are for your printer but the idea is something like this:

TDIR=${TMPDIR:-/var/tmp}
T1=${TDIR}/P${$}_1.cmd
T2=${TDIR}/P${$}_2.cmd
#T1 set up the printer
echo "\033\c" > $T1
echo "0\033CD\c >> $T1
echo "\033P\c" >> $T1
echo "\022\c" >> $T1

# now build T2 to reset the printer; I'll just do a Formfeed
echo "\014\c" > $T2

now within the loop I mentioned above:
we will cat $T1 $XFILE $T2 | some command

where $XFILE is the input file

when the loop is do rm -f $T1 $T2

If you can find the proper printer sequences
and I didn't confuse you too much, this should work.

Hope this gets you started, Clay
If it ain't broke, I can fix that.