How do I set up an HP-compatible printer to print PostScript files?

How do I set up an HP-compatible printer to print PostScript files?

Solaris 8 has this ability with
Print Manager, /usr/sadm/admin/bin/printmgr,
or admintool (select "Browse-->printers").


For older versions of Solaris,
install GhostScript, then use GhostScript (gs) to filter
PostScript files for output to HP LaserJet-compatible (PCL) printers.
Add a filter description file in the /etc/lp/fd directory to call
GhostScript. This technique works for any GhostScript-supported printer.
Note that higher-end HP printers (LJ IV) also support PostScript directly.
For details, see Alexander Panasyuk's GhostScript Solaris Printer HOWTO at
http://cfauvcs5.harvard.edu/SetGSprinter4Solaris.html


Before you do any of this, try printing a plain text file (such as /etc/motd)
to the printer.


Michael Riley reminds us that EPP and ECP printer modes are unsupported.


John Groenveld provides these instructions:


Here's the procedure I followed. It assumes you've got a working
ghostscript with a driver for your printer and that it's attached to
/dev/lp1 (/dev/lp0 on some systems).
The printer queue in the example is called "lj61_ps"
I see a problem with Alexander Panasyuk's HOWTO: he writes directly
to the device in his filter, which print filters should not do.



# Test your driver:
/opt/gnu/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=laserjet -sOutputFile=/dev/lp1 \
/opt/gnu/share/ghostscript/5.50/examples/alphabet.ps

# Create the printer:
lpadmin -p lj6l_ps -v /dev/lp1 -o nobanner

# Create the printer filter definition:
cat > /etc/lp/fd/laserjet.fd <<eof
Input types: postscript
Output types: laserjet
Printer types: any
Printers: any
Filter type: fast
Command: /opt/gnu/bin/gs -q -dSAFER -dNOPAUSE -sDEVICE=laserjet -sOutputFile=- -
eof

# Add the filter name to the filter table:
chown lp:lp /etc/lp/fd/laserjet.fd
chmod 664 /etc/lp/fd/laserjet.fd
lpfilter -f laserjet -F /etc/lp/fd/laserjet.fd

# Configure the printer to use the LaserJet filter:
lpadmin -p lj6l_ps -I laserjet

# Stop the data stream to the printer from being modified:
lpadmin -p lj61_ps -o stty="-opost"

# Enable the printer to accept jobs:
accept lj6l_ps
enable lj6l_ps

# Test:
/usr/ucb/lpr -Plj61_ps -h /opt/gnu/share/ghostscript/5.50/examples/alphabet.ps



After it's working you may want to set the default printer with environment
variable LPDEST in your
startup script (~/.login or ~/.profile) and with "lpadmin -d".


Another solution is Common UNIX Printing System (CUPS), which implements the
Internet Printing Protocol (IPP),
RFC 1179.
IPP standardizes printing of multiple document formats.
CUPS provides System V and BSD (lp & lpr) interfaces
and supports PostScript with a modified version of GhostScript.
For Solaris Intel binaries and documentation, see
http://www.cups.org/





Home
FAQ