Monday, October 4, 2010

Solaris: printing postscript on modern networked HP printers

My first attempts at using the Barcode Writer In Pure Postscript involved a unix script and direct printing on networked HP printers.

While the Unix scripts will be dusted off soon, the postscript file printing to HP printers is documented here.

I am fairly used to creating standard HP print queues in Solaris for SAP printing, however as my interest was in postscript I wanted a simple way to print postscript output. Unix printing is covered in great detail on the web and openprinting.org is the way to go to set it up properly.

However I like to keep things as simple as possible.

I still need to do more investigation as to why "low level postscript" is accepted on HP printers and the future of print device pswrite in ghostscript is unclear to me.

However my simple approach was to basically print postscript files to our office jetdirect HP printers using one common print filter/device pswrite in ghostscript

1) Create a printer

lpadmin -p {printer name} -v /dev/null -m netstandard -o dest={IP address}:9100 -o protocol=tcp -o banner=never -T PS -I postscript


2) Use pswrite as the Ghostscript DEVICE option


Edit file /etc/lp/interfaces/{printer name} and change the following lines

if [ -z "${FILTER}" ]
...
..
...
fi

Change to a one liner


FILTER="/usr/sfw/bin/gs -q -dSAFER -dBATCH -dNOPAUSE -sDEVICE=pswrite -sOutputFile=- -"

then
enable print_queue
accept print_queue

Set the printer up in SAP and BWIPP device type can now print directly to HP printers.....

The same standard filter works for our HP office printers, a colour HP LaserJet 4700 and black and white HP LaserJet 4250.



No comments:

Post a Comment

Google +