print from the command line in mac os x
September 27th, 2008 by Lawrence David
let’s say you want to print all of the pdf files in a directory quickly. printing from the command line in these situations can be handy. here’s how to do it:
>> lpstat -a
will give you a list of all of the installed printer names.
>> lp -d “my_printer_name” ~/my_folder/*.pdf
will send out all of those pdf files to be printed!
The default page size to print on seems to be “letter” to switch it e. g. to “a4″ add the option “-o media=”. Example:
>> lp -d “my_printer_name” -o media=A4 ~/my_folder/*.pdf