-2

Running Centos 7, and latest gnuplot and ghostscript and hplip

Not a newbie, but lost in this one.

What command line do I use to get ghostscript/hplip to put out a file printable on HP OfficeJet HP86xx or similar.

Thanks in advance.

Homer W. Smith CEO Lightlink Internet

2 Answers2

0

This was asked on the #ghostscript IRC channel on freenode.net as well, but very early morning and lat at night on a Sunday aren't brilliant times to get answers. The Ghostscript developers can normally be found there Monday to Friday from around 9am to 6pm CET. There are people around at other times, even on weekends, but those are the most reliable times.

You need to use the pcl3 device because that printer is a PCL3 device. You can then send the resulting file to your printer. Since I don't know how your printer is connected I can't say anything about that aspect.

KenS
  • 30,202
  • 3
  • 34
  • 51
  • Thanks Ken for your answer, and yes, I got it about the time and place. I have tried the pcl3 driver and it does not work, it does print the plot but no color. However I will go back and work that driver some more. My understanding is that present day HP popular printers use a crippled version of pcl3. So may that is the problem, could be just stupid user error, ahem... – Homer Wilson Smith Jun 11 '18 at 20:38
  • Unfortunately PCL is not the homogenous, well specified language that PostScript or PDF is. There are wide variations between the various implementations of the language, even those supplied by HP themselves. This is why Ghostscript has such a lot of HP devices built in. You could try all of them individually (all the hp* devices, as well as the laserjet and lj* devices and the cdeskjet and cdj* devices, oh and the deskjet device). One of those may produce the specific flavour of PCL that your printer wants, I'm afraid I can't tell. – KenS Jun 12 '18 at 07:19
0

Read the options for the pcl3 Ghostscript filter. The command line I am using for an OfficeJet 8720 looks like this:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pcl3 -sSubdevice=unspec -sColourModel=CMYK -r600 -sPrintQuality=0 -dRasterGraphicsQuality=2 -dSendNULs=600 -sIntensityRendering=halftones -dOnlyCRD=true -sOutputFile=output.pcl  inputfile.pdf

You can then send the resulting file to the printer with:

nc -w 1 <printer IP address> 9100

This completely bypasses CUPS or any other spooler, so its possible to do this programmatically without spooling, assuming the system has Ghostscript and netcat. I have not yet solved the problem of page margins and offsets, the pcl3 filter also has a -sMediaConfigurationFile option, but you must construct the content of that file specific to your printer.

Tom
  • 412
  • 2
  • 9