Force printers to print in grayscale

rlincoln
New Contributor

Hi all,

We have over 170 printers in our environment and would like to make the printers print in grayscale by default. Does anyone have a script that the have in place to do anything like this? I do not want to have to touch all 170 printers.

Right now users can add printers via Self Service or by adding IPP or LPD by the printer name.

Thanks in advance.

Rick

17 REPLIES 17

rskolden
New Contributor III

Yo,

I am using two policies for our printers:

  1. Installs printer drivers, printer (either by "Printer" payload or script with lpadmin) and runs a script to trigger policy 2 (Published in SS)

  2. Puts PPD which is set to grayscale (changed in cups on "Composer-machine" and packaged) in place (/private/etc/cups/ppd/)

If you already have deployed the printers you can make a smart group with "Mapped printers - has - printername" and either make a policy that runs "once per computer" or "ongoing" with the use of an extension attribute looking for the PPD file and a smart group.

stevewood
Honored Contributor II
Honored Contributor II

@rlincoln what make/model are these printers? The two ways that @rskolden mentioned are the only ways I know of to force them to grayscale.

Here I use a script to install our printers, so I'm able to set the printers (all Xerox copier/printer models) to default to grayscale during installation:

lpadmin -p Kingslayer -o duplex=none -o XROutputColor=PrintAsGrayscale -o XRFinisher=AFinisher -o xrbannersheet=none

Of course, the tougher one will be when your users are allowed to add printers via IPP/LPD as you mentioned. For this you probably need to change the PPD files on the computers. You can use the Composer method that @rskolden mentioned, that should work fine. This line of code from a BASH script a colleague wrote should give you a head start:

perl -pi -w -e 's/*DefaultHPColorAsGray: False/*DefaultHPColorAsGray: True/g;' "/Library/Printers/PPDs/Contents/Resources/$PPD"

It pasically takes the PPD file name in the $PPD variable and edits the PPD to set printing as grayscale. This would take care of the case where users add printers on their own.

bentoms
Release Candidate Programs Tester

It can be "fun" finding the correct lpoptions for each printer, I detailed it some here.

PeterClarke
Contributor II

By the way a Non-Scripted way of doing this is to use a "Saved Printer Preset",
with the Imaging option set to grayscale. (Generated from inside the Printing Dialogue Box)

And this is quite easy to deploy, and can be done for all printers or just specific printers.
This method will work regardless of the model of printer.
- So I thought worth mentioning, even though not exactly what was asked for.

rlincoln
New Contributor

Hey @stevewood we have all xerox and the models vary ColorQube 8570DN, Xerox Phaser 8860MFP, Xerox WorkCentre 7855 to name a few. I am trying to capture with Composer the change I am making to the PPD but with 170 printers it is a daunting task to say the least.

Any more input would be fantastic!

Thanks in advance!

stevewood
Honored Contributor II
Honored Contributor II

@rlincoln I don't use Composer to capture PPDs or even change the PPD themselves. I simply use lpadmin to add the printers and change the settings:

lpadmin -p <printername> -o duplex=none -o XROutputColor=PrintAsGrayscale

I don't get in to editing the actual PPD files, which you could do. Of course, I also only allow users to add our printers via Self Service. They are not able to add via the Printers pref pane.

As @bentoms pointed out via his blog post, you would need to use lpoptions to find the options for each printer to determine the proper lpadmin commands to send.ommands to send.

Not applicable

@stevewood lpadmin -p <printername> -o duplex=none -o XROutputColor=PrintAsGrayscale - Does the XR stand for Xerox Printer correct? What if we are using Ricoh MP C3504ex PS? Please advise

Thanks

Best regards,
Markie

stevewood
Honored Contributor II
Honored Contributor II

@zachriver24 you are correct, that is the setting for a Xerox printer. Shameless plug:

Use lpoptions To Identify Printer Options

You'll need to identify what the exact option is for the Ricoh. Add the printer to a Mac and then use lpoptions to list the options the printer has. If you're wanting to print BW by default, I'd search for terms like mono or grayscale or maybe just gray.

Hope that helps.

Not applicable

Thank you so much @stevewood. WIll try this.

markangeles
New Contributor

e86db46c005743208ae5546ab8beef74
b10eeb921588432693eaaec8248eac33

Hi @stevewood I can change Duplex to DuplexNoTumble but Im not sure what am I missing in setting it to default grayscale. I tried Grayscale, Gary and Mono but no luck So maybe its has something to do with e correct abbreviation of the Ricoh printer. Any idea? Much appreciated if you can help me.

Thanks in advance

Best regards,
Markie

stevewood
Honored Contributor II
Honored Contributor II

@markangeles can you post the output of all options? Capture as a text file and copy and paste into the post as a script so it is formatted.

anverhousseini
Contributor II

@markangeles For Ricoh I'm using this:

lpadmin -p "Printer" -o "ColorModel=Gray"

Not applicable

Thank you all for the help guys. it's already working. :)

Not applicable

Hi @stevewood

I'm able to set a default to B&W but the problem, I still need to manually add the printer on the mac and after that associate the script then it works.

lpadmin -p follow_you_print_Ricoh -o duplex=DuplexNoTumble -o ColorModel=Gray. You mention that this script also can add the printer list am I right? But for me, it didn't work.

Please advise

Thank you in advance

stevewood
Honored Contributor II
Honored Contributor II

@zachriver24 I defer to my blog:

Deploying Printers via Script

and

Using lpoptions To Identify Printer Options

The first post will explain how to add printers, the second will explain how to identify options, like paper decks or finishers.

Not applicable

@stevewood Thank you so much! all working now. Your Blog is very informative.

wwhite36
New Contributor II

Having an issue with script not excepting gray scale when I verify in CUPS. If I create script without the ppd driver it works. Once I add the Xerox driver ppd file in script will not change to gray scale stays color. Anyone have any ideas on this issue?

lpadmin -p "printername" -L "location" -E -v ipp://10.xx.xx.xx -o XROutputColor/XeroxBlackandWhite:PrintAsGrayscale -P /Library/Printers/PPDs/Contents/Resources/Xerox VersaLink C405.gz