Issue with PCL3GUI output

Paul Goyette <[email protected]> Sat, 22 Jul 2017 18:32:18 +0800 (+08)
Newsgroups gmane.comp.printing.ghostscript.devel
Message-ID <[email protected]>
Hopefully this hasn't been asked before - I looked and didn't see it...


I'm new to ghostscript, so I might be doing things totally wrong.  But 
I've got a "HP DeskJet Ink Advantage 2545" printer to which I am 
connected via WiFi network.  HP is apparently notorious for not making 
detailed specs available, but as far as I can tell this printer only 
talks "PCL3GUI2".  I looked at the .ppd file available from HP for 
"DeskJet_2540_Series" and it seems to confirm, with a line that says

 	*hpPrinterLanguage: "pcl3gui2"

As a simple test, I tried to print some plain text using the following 
shell script, using enscript to provide post-script input corresponding 
to the plain-text:

#! /bin/sh

echo "This is a test." | \
enscript -Bh -q -p- | \
/usr/pkg/bin/gs -q -dSAFER -dNOPAUSE -r300 -sDEVICE=pcl3 -sSubdevice=unspec \
 	-sPJLLanguage=PCL3GUI2 -sOutputFile=- -sPAPERSIZE=letter \
 	-sColourModel=CMYK -dBlackLevels=4 -dCMYLevels=4 \
 	-sPrintQuality=presentation -sMedium=plain -

The ghostscript command was suggested by a friend who uses ghostscript 
(but has some unrelated flavor of printer).

The output of the shell script appears reasonable (although I certainly 
didn't decode the embedded 2.5K graphic!).  Yet when the output is sent 
to the printer (via netcat, for example), nothing gets printed.  The 
paper feeds, stalls for a brief moment, and then ejects, but no ink gets 
put to paper.  (I'm connecting to the printer via "raw" port 9100, so 
there's no feedback nor any sort of diagnostic or error message from the 
printer.)

I feel certain that there's something wrong with my script, but I really 
haven't a clue where to go from here.  I have tried removing the last 
two lines of the arguments, and I've tried PJLLanguage=PCL3GUI (without 
the trailing 2), but neither of these changes makes any difference.

Does anyone out there have a "magic incantation" for this HP DJ-2545 
printer?

Thanks in advance for any help you might offer.



+------------------+--------------------------+----------------------------+
| Paul Goyette     | PGP Key fingerprint:     | E-mail addresses:          |
| (Retired)        | FA29 0E3B 35AF E8AE 6651 | paul at whooppee dot com   |
| Kernel Developer | 0786 F758 55DE 53BA 7731 | pgoyette at netbsd dot org |
+------------------+--------------------------+----------------------------+