How can I make the OS print dialog default to a particular preset?

Simply put, this is what I want: I want to take a unique printer preset that has already been made and make the OS default to it any time that particular printer is selected to be printed to.

I know how to edit a particular printer's 'Default Settings' preset through the CUPS web UI, but this solution doesn't work for me because one of the printing options I need to change doesn't appear in this UI (for science: the printers I'm working with are Konica Minolta Bizhub C252, C353, and C364; the setting I'm looking to change is make the default color "Grayscale").

I have been able to modify the com.apple.print.custompresets.forprinter.PRINTER.plist file to get the system print dialog to pull up the preset that I want by default, but there is a problem with solving things this way: I can't edit this PLIST file properly with TextEdit (the XML gets mangled), and installing XCode on every machine isn't feasible. A solution could be to bring an editor with me on a thumb drive to each machine, but I don't know of an app I could use.

Any path to a solution to this problem, I am open to. I've tried to be as specific about my ultimate goal as possible, and I will answer any followup questions I can.

Any ideas?


Solution 1:

There is a much easier way.

  1. Create a Print Preset, with the settings as you want them. Select it.

  2. Press the Print button while holding down Alt (Option).

That will force your current settings to be the default for the printer.

Solution 2:

This Konica model is a PostScript printer, right?

You shouldn't need to directly edit any .plist file for this.

The correct way to do this without using the GUI (web UI or printer settings) is via the lpadmin command.

  1. First, find out what options are provided by the printer (which are laid down in the PPD file located in /etc/cups/ppd/printqueuename.ppd):

    lpoptions -l -p printqueuename
    

    Most likely you will see lots of lines, one of them like these:

    [....]
    ColorModel/Color Mode: *CMYK Gray
    [....]
    

    In each line the asterisk (like above in '*CMYK') denotes a default setting, which will be automatically applied when printing, and you do not need to specify it separately.

    That means, you would have to supply a print job you want done in Gray on the command line like this:

    lp -d printqueuename -o ColorModel=Gray some-file
    
  2. Second, now use this Knowledge to change this setting system wide by running this command:

    sudo lpadmin -p printerqueuename -o ColorModel=Gray
    

    You can now check, if your setting has been applied. For this, run:

    lpoptions -p printerqueuename | grep --color ColorModel
    

Of course you can apply this method for any other particular setting. To repeat:

  1. Use lpoptions -l -p printer to find out the (vendor-specific) syntax of option names and their values

  2. Use lpadmin -p printer -o option1=valuaA -o option2=valueB ... to set (multiple, in this case) default print settings (which will also show up pre-selected in the OS print dialog). [Note: for more recent CUPS versions you have to use -o option1-default=valueA...]

  3. Check success of setting with lpoptions -p printer (or check it with the GUI).