Installing a Generic PCL printer via script

Krytos
New Contributor III

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 6

analog_kid
Contributor

Hi Krytos,

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

--Ben

Krytos
New Contributor III

@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?

analog_kid
Contributor

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

Krytos
New Contributor III

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

analog_kid
Contributor

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.

Krytos
New Contributor III

@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!