That being said, now let's move on to the good stuff :-)
Here is the cheat sheet that you probably care about:
# TO ADD A (generic HP style) NETWORK PRINTER to Solaris 11 lpadmin -p testprint -E -v socket://1.2.3.4 \ -P /usr/share/ppd/SUNWhpijs/HP/hp-color_laserjet-ps.ppd.gz # To view all defined printers lpstat -v # To view details on a named printer 'testprint' lpstat -l -p testprintSolaris 11 users should probably ignore the rest of this page.
The syntax that most people will care about:
lpadmin -o stty=opost,onlcr
(If it is directly on a solaris parallel port)
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
#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 >file.psAlternatively, on newer Solaris release, you can use the mp command:
mp file.txt >file.ps
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 sfile=${file%%.fd} lpfilter -f $sfile -F /etc/lp/fd/$file doneThis will enable all the "filters" (like the "text to postscript" filter), that otherwise may not kick in.
Written by:
Back to Phil's Solaris pages