Posted on 03-03-2016 12:36 PM
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
Posted on 03-04-2016 02:46 AM
Yo,
I am using two policies for our printers:
Installs printer drivers, printer (either by "Printer" payload or script with lpadmin) and runs a script to trigger policy 2 (Published in SS)
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.
Posted on 03-04-2016 08:03 AM
@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.
Posted on 03-05-2016 02:52 PM
It can be "fun" finding the correct lpoptions for each printer, I detailed it some here.
Posted on 03-06-2016 12:53 PM
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.
Posted on 04-22-2016 10:27 AM
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!
Posted on 04-22-2016 01:22 PM
@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.
Posted on 04-04-2019 11:05 AM
@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
Posted on 04-04-2019 11:41 AM
@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.
Posted on 04-04-2019 06:13 PM
Thank you so much @stevewood. WIll try this.
Posted on 04-09-2019 07:26 PM
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
Posted on 04-09-2019 07:56 PM
@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.
Posted on 04-10-2019 01:44 AM
@markangeles For Ricoh I'm using this:
lpadmin -p "Printer" -o "ColorModel=Gray"
Posted on 05-14-2019 12:40 AM
Thank you all for the help guys. it's already working. :)
Posted on 05-14-2019 01:17 AM
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
Posted on 05-14-2019 07:16 AM
@zachriver24 I defer to my blog:
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.
Posted on 05-17-2019 12:47 AM
@stevewood Thank you so much! all working now. Your Blog is very informative.
Posted on 01-09-2020 10:14 AM
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