Is it possible to change a printer's defaults?

New Contributor

I know that I can make a new preset for a printer and I'm assuming I can use Composer to push that out to my end users. I would like to be able to make that new preset the default so that I don't have to rely on end users switching to it when they send a print job.



I do this using lpadmin. For example:

lpadmin -p 1_Copier -L 1st_Floor_Work_Room -E -v lpd:// -P /Library/Printers/PPDs/Contents/Resources/Xerox WorkCentre 7855.gz -o printer-is-shared=false -o XRTrays=FiveTrays -o XRFinisher=SBFinisher -o XRHolePunch=23Unit -o sides=one-sided -o XRJobStorage=false

And if I forget to add an option, I either push out that policy again with the additional setting or run a script like this to modify all the existing printers on the device the policy is scoped to (eg, this one: I pushed out only to students to add their name & print date to printed pages):

lpstat -p | awk '{print $2}' | while read printer; do lpadmin -p $printer -o XRAnnotationOption=Standard -o XRAnnotationPage=AllPage; done

New Contributor III

@jduvalmtb thanks for posting this, we have a requirement to make all our printers (we have over 1000) to be double sided and black & white (or mono) by default. Can that be scripted across different vendor PPD's with the above commands? We support HP, Xerox and Toshiba MDF's mostly. Thanks

Valued Contributor II

@ Frank

I did a little research in to the same thing you have to do and it wasn't pretty. I found a post on a web site that I didn't book mark sorry ....what it came down to is that ......

I think you are going to have to create a script for each printer, the setting and commands are not the consistent even if it's the same manufacture.




Heh, we're dealing with a grand total of 11 printers I have to script this way. Quite easy for me!

"-o sides=one-sided" is standard across all CUPS printers - that should be regardless of manufacturer. Check out the man pages for lpadmin & lp. In my commands, the XR commands are the ones specific to our Xerox devices, and all our Xerox devices use the same XR Commands. To see yours and find out if you're so lucky:

lpoptions -p [PrinterName] -l

This will give you the specific options you can designate for your manufacturer. These are the XR options I was referring to above. I usually pipe it to a .txt document to make it easier to search.

Esteemed Contributor
Esteemed Contributor

@jduvalmtb I don't think all printers adhere to that standard, at lead the Canon's we have needed a different key, as per what I posted here.


@bentoms Good to know, thanks. Who needs standards! At least there's still an lpadmin switch for it.