Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SCO OS5.0.5 Printer Admin 1

Status
Not open for further replies.

piquet

Programmer
Nov 25, 2002
19
GB
Hi,

I'm running a SCO server (OpenServer 5.0.5) with a dot matrix label printer connected. All of a sudden I can't buy the same 10 line label stationery the system is set up for, so I had to settle for labels about half the form size.

Going into the sysadmin shell printers section seems to give no opportunity to change the default form length on the device. Does anyone have any ideas on how to achieve this setting? Thanks for any help!

Phil
 
What emulation is the dot-matrix printer running?

I would directly modify the
/usr/spool/lp/admins/lp/interfaces/<printername>
file.

There will be an &quot;echo <ESCAPE SEQUENCE>&quot; line
generally just before the cat $FILE line.

eg ibm grphics printer emulation
if it is 6 lpi then the following sets the form length to 42 lines (7&quot;form)

echo &quot;\033C\052\c&quot;

eg epson lq or microline printer emulation

echo &quot;\033F42\c&quot;

hth


 
Thanks stanhubble - I've taken a look and found that the Panasonic printer we're using is Epson compatible and uses an interface called &quot;myepson&quot;. There is a section in this script which appears to set the form length to 10 lines -
---------------------------------------------------------
for i in $options; do
case $i in
b|nobanner) banner=no ;;
# Z002 begin \/\/\/\/
10line) echo &quot;\033C10\c&quot;
;;
bold) bold=yes
echo &quot;\033E\c&quot;
;;
italic|i) italic=yes
echo &quot;\033\064\c&quot;
;;
... etc ...
-----------------------------------------------------------

Our label script simply prints up to 10 lines using escape sequences for bold, double height etc, to the label printer. The label is printed and a form feed issues to leave the stationery in the correct position for the next label.

I have tried changing /var/spool/lp/model/myepson file (excerpt above) to amend &quot;\033C10\c&quot; to &quot;\033C05\c&quot; and it does not have the effect of changing the form length. I have tried this line higher in the program so that it always executes - no effect.

Where should I be changing this parameter for it to have an effect? Do I need to stop and start the printer spooler for the changes to take effect?

Thanks for any help,

Phil
 
if you changed only the copy in the &quot;model&quot; directory then any &quot;NEW&quot; printers defined with that &quot;driver&quot; will use your changes. To have the changes apply to an existing printer your must change the script in
/usr/spool/lp/admins/lp/interfaces/

 
Thanks again,
I didn't mention that this dotmatrix is connected via a JetDirect box to the network.

I have looked at the &quot;PANASONIC&quot; script in /usr/spool/lp/admins/lp/interfaces which does this :

# This script invokes the original model script
# from the subdirectory model.orig and pipes its
# output to hpnpf.
MODEL=`basename $0`
REALMODEL=`echo $0 | sed -e &quot;s%$MODEL%model.orig/$MODEL%&quot;`
....

I'm not sure, but I guess $0 would be &quot;PANASONIC&quot; and so it would use a file called /usr/spool/lp/admins/lp/interfaces/model.orig/PANASONIC. This file I have also edited as described in my last post, and it appears to make no difference to the form length. I added the second of these 2 lines :
echo &quot;\033@\c&quot; # Z001 - reset to default mode
echo &quot;\033C05\c&quot; # Set to form length 5

So, either this script is not being executed on lp -dPANASONIC calls, or the escape sequence I added is either ineffective or not being executed.

Hmmmm ! Phil

 
Personally I stay as far away from hpnpf as possible.

most print servers will work just fine with lpd.

another alternative is netcat (see faq in this forum).
 
The thing is, the dot matrix has worked fine for years using hpnpf, with the form length set to 3 inches. Are you saying that changing to lpd/netcat will allow me to change the form length more easily? Cheers, Phil
 
No ,but i'm not going to be much help with hpnpf since i don't use it.

If you can't find any further occurances of
\033C10
cd /usr/spool/lp
find . -exec grep &quot;033C10&quot; {} \;

then you may need to look in the print job itself.
 
Does going through hpnpf's menus not give you an option to adjust it? jetadmin or hppi or whatever it happens to be on the version you use?

I'm with Stan on this one, I avoid hpnpf like the plague. Annihilannic.
 
After the ESC sequence in the printers driver made absolutely no difference I wrote a small piece of code to count lines printed, and to print blank lines at the end of the print job to move the printhead to the correct top of form position. A bit of a kludge, but it works !

Thanks for your help!

Phil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top