Useful macOS defaults: Printing

com.apple.print.PrintingPrefs controls printing behaviour on macOS.

Quit the printer app when print jobs finish

When you print something, macOS opens a printer app in the Dock that shows the print queue. By default it stays open after the job finishes. To make it close on its own:

defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool true

To go back to keeping it open:

defaults write com.apple.print.PrintingPrefs "Quit When Finished" -bool false

Expand the print dialog by default

The print dialog starts in a small, compact view. To always see the full dialog with all options:

defaults write NSGlobalDomain PMPrintingExpandedStateForPrint -bool true
defaults write NSGlobalDomain PMPrintingExpandedStateForPrint2 -bool true

Note: this setting lives in NSGlobalDomain, not in the printing preferences domain.

Manage printers from the command line

You can manage printers without opening System Settings:

# List all printers
lpstat -p -d

# Set the default printer
lpoptions -d Printer_Name

# Print a file
lpr -P Printer_Name file.pdf

# Check the print queue
lpq -P Printer_Name

# Cancel all jobs on a printer
cancel -a Printer_Name

Notes

Most printing settings are per-printer and managed through the print dialog or System Settings, then Printers and Scanners. The defaults commands above handle the few system-wide preferences.


Enjoyed this post?

Well, you could share the post with others, follow me with RSS Feeds and/or send me a comment via email.


Tags

Category:

Year: