Skip to main content
Question

Installing a Generic PCL printer via script

  • February 27, 2018
  • 6 replies
  • 34 views

Forum|alt.badge.img+5

hey All,

Our High Sierra updated lab computers will not print to our pharos instance in word and some PDF documents. Its due to a known issue with PostScript drivers. One of the solutions is to simply change to PCL drivers.

However, Heres the script I use to add a printer with the generic PS driver. I cannot figure out where the PCL driver is located, and have read it may be generated dynamically. How can I use a similar script and also change the driver to a working PCL driver rather than the generic PS driver?

"lpadmin -p PRINTERNAME -o APOptionalDuplexer=True -D "PRINTERNAME" -L "LOCATION" -E -v "//PATH/TO/PRINTER" -P "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/Resources/Generic.ppd"
#!/bin/sh

6 replies

Forum|alt.badge.img+6
  • New Contributor
  • 61 replies
  • February 28, 2018

Hi Krytos,

The Generic PCL driver is built into CUPS and can be referenced with the following path: drv:///sample.drv/generpcl.ppd

--Ben


Forum|alt.badge.img+5
  • Author
  • Contributor
  • 25 replies
  • February 28, 2018

@analog_kid

Thanks, this looks promising, but is that drv and sample.drv a variable? My script is unable to find files at that location when i use exactly what was provided.

I just replaced the PS driver with drv:///sample.drv/generpcl.ppd

am I missing something?


Forum|alt.badge.img+6
  • New Contributor
  • 61 replies
  • February 28, 2018

Sorry, I should have mentioned to use "-m" instead of "-P" in your lpadmin command.


Forum|alt.badge.img+5
  • Author
  • Contributor
  • 25 replies
  • February 28, 2018

Heres what I've ended up with and seems to be working:

/usr/libexec/cups/daemon/cups-driverd cat drv:///sample.drv/generpcl.ppd >> /tmp/genericpcl.ppd
lpadmin -p PRINTERNAME -o APOptionalDuplexer=True -D "PRINTERNAME" -L "LOCATION" -E -v "//PATH/TO/PRINTER" -P /tmp/genericpcl.ppd

Forum|alt.badge.img+6
  • New Contributor
  • 61 replies
  • February 28, 2018

That's some unessesary contortions you're going through. ;)

Drop the "-P" switch, and add the "-m" for the Generic PCL driver, like so (simplified):

lpadmin -p printername -E -v printserver -m drv:///sample.drv/generpcl.ppd

It's been hectic here so apologies for being quite terse before.


Forum|alt.badge.img+5
  • Author
  • Contributor
  • 25 replies
  • February 28, 2018

@analog_kid no worries! You've been a great help and I think we've solved our little cups/high sierra/post script issue.

Thanks again!