Printer hints for solaris

Brief intro for the uninitiated:

Solaris, and most appls that run under solaris, expect a postscript printer. If you dont have one, get one. If you cant afford one, install ghostscript, and read the ghostscript FAQ on setting up a printing filter.

That being said, now let's move on to the good stuff :-)

The syntax that most people will care about:

What to do if you have a direct-attached(parallel port) printer

lpadmin -p lp -v /dev/lp[whatever] -T PS -I postscript

What to do if you have a networked HP printer

There are many pieces of advice, some of which include: BUT!

All of this seems now unneccessary, since HP net printers which emulate their own LPD have special names for internal filtering. Assuming your HP network printer has been added to the hosts table as "hplj", you could address it as

  1. lpadmin -p hp -s hplj
  2. lpadmin -p hp -s 'hplj!text'
  3. lpadmin -p hp -s 'hplj!raw'
  4. lpadmin -p hp -s 'hplj!auto'

#4 will automagically make everything work! It should accept postscript as postscript... but it will also take UNIX text, and add CR *iff* it is neccessary!

When I tried it on an HP 4050, anyways. Lemme know if it doesnt work on a relatively recent networked HP.

If you wanted to manually convert a text file to postscript, the mindless way, you can invoke the solaris PS filter by hand, with

/usr/lib/lp/postscript/postprint  file.txt >
Alternatively, on newer Solaris release, you can use the mp command:
mp  file.txt >

An obscure bit of info that I wanted to preserve on my own site:

If, as root, the command "lpfilter -f all -l" returns nothing, you should do the following:

# # Note that this is ksh syntax
# cd /etc/lp/fd
#   for file in * ; do
        lpfilter -f $sfile -F /etc/lp/fd/$file

This will enable all the "filters" (like the "text to postscript" filter), that otherwise may not kick in.

Written by:Philip Brown
Back to Phil's Solaris pages