10.6: Set Printer Presets from the Terminal

Aug 11, '11 07:30:00AM

Contributed by: Anonymous

If you want to set the printer preset from the terminal in 10.6 (or from an AppleScript via a 'do shell script' command), it's different than how it's done in previous versions of OS X.

Assuming you have a printer called 'Copy Room Printer' and a preset called 'double-sided, stapled,' you would run the following two commands:

defaults write com.apple.print.custompresets.forprinter.Copy_Room_Printer com.apple.print.lastPresetPref 'double-sided, stapled'

defaults write com.apple.print.custompresets.forprinter.Copy_Room_Printer com.apple.print.lastPresetPrefType 3
Just set the parameters to match your own needs.

[crarko adds: I haven't tested this one. If this works in Lion or you find an equivalent, please post it in the comments.]

Comments (1)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20110726215221378