1826501 Members
1893 Online
109692 Solutions
New Discussion

printer model file

 
SOLVED
Go to solution
Bill Fisher
Occasional Contributor

printer model file

Does anyone know of a source for a model file for an epson fx-1050 printer? Or what changes to make to the dumb model to change the form feed to a line feed? On HP-UX 10.20
5 REPLIES 5
Jeff Schussele
Honored Contributor
Solution

Re: printer model file

Hi Bill.

In the /usr/lib/lp/model/dumb file change the LAST line that now reads

echo "\014\c"
to
echo "\012\c"

This will cause line feeds instead of form feeds at the end of print jobs.
I wouldn't recommend this for laser printers as it won't cause the ejection of print jobs. But that dot matrix printer won't have that problem.
You may want to rename that file to something else (dumb2?) & use that unique filename as the model name for this ptr to avoid the problem on laserjets.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
A. Clay Stephenson
Acclaimed Contributor

Re: printer model file

All you would have to do to change a FF to a LF inside the dumb interface is pipe the input file(s) through tr:
tr "\014" "\012"

However, I doubt that is what you really want to do. I suspect that you want to capture FF's and convert that to enough LF's to finish the page and that is the sole responsibility of the application rather than the spooler itself.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: printer model file

You can refer to the FX User's Manual for any escape sequences/control codes you may need.

http://www.epson.com/cgi-bin/Store/support/supDetail.jsp?BV_UseBVCookie=yes&oid=14294&infoType=Doc
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: printer model file

AS mentioned, you can change the one formfeed to a linefeed at the end of the script. That means that the paper is left in the printer and the next job will print in the middle of the page, assuming your print jobs do not have an imbedded formfeed at the beginning. Now if you want to convert ALL formfeeds imbedded in every print job, you'll need to process each line of the job through tr by replacing the cat command as in:

cat "$file" | tr -s "\014" "\012"

This will replace every formfeed in the data file with a linefeed.


Bill Hassell, sysadmin
Tor-Arne Nostdal
Trusted Contributor

Re: printer model file

We use several "special" printers on our system.

We're running SAP on HP-UX/Oracle.

Matrix printers and other special printers is setup like this on UX.

First we connect all such printers with HP JetDirect EX adapters.
This ensure proper network connection via TCP on port=910x
LPT Port1=9100
LPT Port2=9101
LPT Port3=9102
1) select dumb plot as device driver
2) then we edit the file /etc/lp/interface/model.orig/{queuename}
cat "$file"|ux2dos 2>&1
The ux2dos command will do the necessary translate as shown in the previous answers.
If not available you could use the tr command.

3) If the printer is not connected with a HP network adapter you might need to set another tcp port number.
Example: old Intel Netport adapters using tcp port=3001
edit the file /etc/lp/interface/{queuename}
xPORT="-p 3001"

What you might loose by setting the printers up with the dumbplot - is two way communication related to error handling etc.

I have attached a model file which you could use.

/Tor-Arne
I'm trying to become President of the state I'm in...