Monday, October 23, 2006

Problematic Printing

I've just migrated an important service off an old Solaris 8 machine onto a new(ish) server running Solaris 10.

Everything went pretty smoothly, with the exception of a few little printing problems. (I'm not a printer person, really. Whatever happened to the paperless office?)

I had just used lpadmin to set up the printers. I've read that printing in Solaris 10 is much better than it used to be (and that may be true) so that it can drive printers properly out of the box without the need for extra products like the HP JetDirect (what used to be JetAdmin) printer driver. Indeed, to the point that you're not supposed to use JetDirect any more.

In our testing we had ended up setting the type to any (rather than postscript) and using the netstandard model script. Anything more sophisticated and it mangled some of the printouts (specifically, we had some plaintext reports that had embedded characters to switch the printer to landscape that didn't work).

What we discovered today was that printer tray and media selection weren't working. I had been told that this was done in the application, but what that actually meant was that there was a wrapper shell script that called lp with some options that the jetdirect software can understand. And clearly the vanilla print system under Solaris doesn't grok those options.

So what I've had to do is to install the latest version of the JetDirect software that I can find (E10.34). And then add the specific model scripts for our model printers (and these are on the HP website, although they're a devil to find and the HP search is almost useless). And then using that to drive the printers made everything work flawlessly.

I'm sure there must be a way to pass the appropriate printer options to select the correct media type without running everything through JetDirect, but I've yet to find it. (Oh, and it would be nice if it used the same option names, to save having to track down every wrapper script that might be involved, although that's not absolutely necessary.)

2 comments:

Peter Tribble said...

The snag is that I had set things up the new way to start with - using lpadmin is pretty easy (and can be automated).

The problem was that using foomatic meant that much of the output was mangled - in particular, none of the plain text came out the way it was supposed to.

When I got rid of foomatic and passsed everything through raw, then it came out correctly, but not always from the correct tray. So the builtin printing support fails to work correctly.

Using JetDirect everything comes out correctly and on the correct media. So that's what we have to go with (it's a business critical system).

Anonymous said...

The print manager has an option to show you the commands it used to create the needed stuff.

It showed me something like:
/usr/sbin/lpadmin -p $PRINTER -v /dev/null -T PS -A write -i /usr/lib/lp/model/netstandard -o dest=$PRINTER -o protocol=bsd -o nobanner -I postscript -u allow:all
/usr/sbin/lpadmin -p $PRINTER -D "$PRINTER drucker"
/usr/bin/enable $PRINTER
/usr/sbin/accept $PRINTER
/usr/sbin/lpfilter -f catv -F /etc/lp/fd/catv.fd
/usr/sbin/lpfilter -f download -F /etc/lp/fd/download.fd
/usr/sbin/lpfilter -f dpost -F /etc/lp/fd/dpost.fd
/usr/sbin/lpfilter -f postdaisy -F /etc/lp/fd/postdaisy.fd
/usr/sbin/lpfilter -f postdmd -F /etc/lp/fd/postdmd.fd
/usr/sbin/lpfilter -f postio -F /etc/lp/fd/postio.fd
/usr/sbin/lpfilter -f postior -F /etc/lp/fd/postior.fd
/usr/sbin/lpfilter -f postmd -F /etc/lp/fd/postmd.fd
/usr/sbin/lpfilter -f postpages -F /etc/lp/fd/postpages.fd
/usr/sbin/lpfilter -f postplot -F /etc/lp/fd/postplot.fd
/usr/sbin/lpfilter -f postprint -F /etc/lp/fd/postprint.fd
/usr/sbin/lpfilter -f postreverse -F /etc/lp/fd/postreverse.fd
/usr/sbin/lpfilter -f posttek -F /etc/lp/fd/posttek.fd
/usr/sbin/lpfilter -f pr -F /etc/lp/fd/pr.fd

I hope you or someone reading this could use the information.

Btw: you have a really informative site. Congratulations & thx.