System Administration
Showing results for 
Search instead for 
Did you mean: 

HP-UX sends Postscript print jobs to non-Postscript printer

Go to solution
Occasional Advisor

HP-UX sends Postscript print jobs to non-Postscript printer


We've got a problem with printing on HP-UX 11.31 (on a HP Integrity rx2660 Server).

We try to print from Java 1.6.x applications to the default Laserjet 4 printer (no Postscript module). The applications list the correct printer name and send print jobs to it, but the Laserjet reports the error: "W2 INVALID PERS"
(Meaning: The job was not printed because the requested personality, such as PostScript, was not installed.
Resolution: Install the language in which the files are sent, together with enough memory to support that language.)

With HP SMH we've configured the Laserjet 4 (no Postscript). It's connected directly to the HP UX machine, via serial cable. We copied from /usr/spool/lp/ a file like (IIRC) hp_laserjet4 to folder /usr/spool/lp/interface . The file containts also these two lines:

Pure console applications can successfully send their raw text data to the Laserjet via "lp". Also some old applications using Starbase can send parts of their CAD graphics to the Laserjet. Just parts, because Starbase isn't supported anymore and so these applications don't run correctly.

Firefox printing produces the W2 error on the Laserjet too, like the Java applications do. Firefox however doesn't list the correct printer name but just a printer named "Standard postscript printer" (or similar). Firefox still sends its print job to the Laserjet, but the result is the mentioned W2 error.

Nota bene: before the Laserjet printer reports the W2 error, it prints a configruation page.

What could be wrong with our configuration?

Re: HP-UX sends Postscript print jobs to non-Postscript printer

Spooling under HP-UX is dumb. lp(1) will send send the data to whatever printer you tell it, no matter if it can print it or not.

So postscript can only be sent to a PS enabled printer.
Honored Contributor

Re: HP-UX sends Postscript print jobs to non-Postscript printer

The HP-UX print spooler system is very simple: it does make any conversions to the print jobs. The "default_mode" setting controls how the lp command options are implemented: if necessary, the spooler just prefixes the appropriate commands to the print job. The print job may contain other commands that override the prefixed commands.

Applications like Firefox (and Java) tend to just assume that the printer can handle PostScript. If you use a non-PostScript printer, you'll have to include a RIP processing software (like Ghostscript) to the print queue. That requires a customized interface script for your printer.

Modern print spooler systems, like LPRng and CUPS, include much of the necessary automation for protocol conversions as standard: for example, if a PCL-only printer is configured to CUPS and Ghostscript is available on the system, CUPS will use it to convert any PostScript print jobs to PCL.

Replacing the entire printing system might be an overkill for your problem. It might be more economical to install Ghostscript and just set up a second print queue for PostScript jobs for this printer. This queue would need a custom interface script that pipes the print job through Ghostscript before sending it to the printer as usual.

Occasional Advisor

Re: HP-UX sends Postscript print jobs to non-Postscript printer

Many thanks for your replies!

So we either need a postscript printer or a decent spooling system (like CUPS & Ghostscript).

Since a) our old Laserjet 4 is really old and doesn't produce the brightest output anymore, and b) we need milimeter/inch accurate and clean printings from our applications (Java), we plan to buy a new HP Laser printer with Postscript.

What would be a "natural" successor to HP's Laserjet 4 but with Postscript? Color isn't needed, but it should print millimeter accurate CAD printings.

P.S. Is it possible, that an accurate CAD Postscript file gets innacurate during transformation from vector Postscript format to pixelbased rastergraphic format with CUPS/Ghostscript ?
Or does CUPS/Ghostscript transform vector Postscript files lossless to vector PCL files on HP Laserjet (with no Postscipt module) ? (I'm not familiar with PCL.)
Occasional Advisor

Re: HP-UX sends Postscript print jobs to non-Postscript printer

The question about which HP Laser printer fits best the task, I put into another thread on "HP-UX General" ( )

The CUPS/Ghostscript transformation question can stay here, I think.
V. Nyga
Honored Contributor

Re: HP-UX sends Postscript print jobs to non-Postscript printer


we're using HP LaserJet 5100 currently, but this seems to be discontinued now.

You have to watch for UX-compatibility, network and ps, so for example:
HP LaserJet P2055dn Printer (CE459A)〈=en&cc=us

*** Say 'Thanks' with Kudos ***