Is there a way I can change the defaults for printer & paper size? Either vanila AS (not sure where to look) or using Shell. thanks
I’m failry positive this would have to be accomplishied through GUI scripting which, sadly, is something I absolutely suck at. Hopefully someone else here will know though.
Hi Mark,
setting the printing/faxing prefs is only possible with GUI scripting,
exept setting the default printer, which can be done with
tell application "Printer Setup Utility" to set current printer to "myFavouritePrinter"
but you can use the shell to print with several parameters.
Here is a simple example
set theFileToPrint to quoted form of POSIX path of (choose file without invisibles)
set allPrinters to paragraphs of (do shell script "lpstat -a | awk '// {print $1}'") -- lists all available printers
set thePrinter to item 1 of (choose from list allPrinters with prompt "choose printer")
if thePrinter is false then return
do shell script "lpr -P " & thePrinter & " -o page-ranges=1-6 -o landscape -o media=Letter -o scaling=80 " & theFileToPrint
you can find a few more parameters on this site