1836383 Members
3583 Online
110100 Solutions
New Discussion

Re: Non-HP printer setup

 
SOLVED
Go to solution

Non-HP printer setup

Hi
I have never work with printer before I need big time help.
We have eltron bar code printer. We just want to send simple text file which has four line in it. Printer is directly connected with unix workstation.

How do I configure it? what is the model script? I try to read other post about it but it is not making sense to me, maty be I am dumb. I have dumb model script that we are using to setup our old Epson dot matrix printer.
Here is what I was doing for my dot matrix pritner
lpadmin -plb -mdumb -v/dev/c0t1d0_lp


2 REPLIES 2
Olav Baadsvik
Esteemed Contributor
Solution

Re: Non-HP printer setup


Hello,

Here is what I suggest.

. Use SAM to define a local printer.
Do not bother about what model-script
to use (this will be taken care of later)
But in SAM you will have to specify the
correct port to connec to (serial or parallell)

. When you have defined the printer with SAM
the model script for the printer will be
found in /etc/lp/interface as a file with
the same name you gave to the printer in
SAM.
Replace this file with the simplest model-script you can find. It may be that the dumb
script you used for your matrix printer is ok.

If not, here is about the simplest
interface-script available:#!/usr/bin/sh
# $Source: /hpux/shared/supp//usr/src/cmd/lp/./model/dumbplot,v $
# $Revision: 72.2 $
#
# lp interface for dumb plotter
#

copies=$4

# Handle disable and cancel traps
trap "trap 15;kill -15 0;exit 0" 15

# The remaining arguments are files

shift; shift; shift; shift; shift
files="$*"

# Plot the spooled files


i=1
while [ $i -le $copies ]
do
for file in $files
do
cat "$file" 2>&1

done
i=`expr $i + 1`
done

exit 0

If you use the serial port you may have to
use a stty command at the top of the script
to set the speed. Check other scripts in
/usr/spool/lp/model to see how this is done.
It may also be that you will have to add
this command after the cat "$file ..
echo "\014\c"
to get the paper out of the printer.
You may have to check the manual for your bar code printer to see if a special command is
needed to do this. "\014\c" is a form-feed.

Good luck

Olav


Re: Non-HP printer setup

I am half way now.
Thanks

I was able to communicat to printer. I did print a line of text.

I setup printer as you say. created a text file with control sequence and print that control sequence file and I have one line of text.

Second question now. How do I convert my four line text to printer sequence.

file1 is looks like
Unix works fine
Linux may work fine
Windows works some time

when I try to print this text file it won't work until I have some thing like

A50,0,0,1,1,1,N"unix works fine"
A50,50,0,1,1,1,N"Linux may works fine"
A50,100,0,1,1,1,N"Windows works some time"

Then it works.
How can I convert my text file? My programmer is not going to change his application. I have to do some this on my side. Can I create new file in model script?