Skip navigation.
 
mlRe: Printing PDF files
FROM : Avi Cherry
DATE : Wed Jan 08 21:07:01 2003

At 6:20 PM -0800 1/8/03, Ben Mackin wrote:
>Just out of curiosity, how would I tell lpr which printer to print to. I
>found this in the man page:
>
>-P destination
>    Prints files to the named printer.
>
>So I tried using printerArray = [NSPrinter printerNames] to get the list of
>printer names, and then chose one ([printerArray objectAtIndex:0]), and
>passed that string as the "destination". But no luck, kept rejecting it and
>not recognizing the printer. Am I going about this wrong, or did I just
>forget something obvious.


lpstat -t will give you a list of printer names.

lpr -P printername will indeed choose the printer.

Related mailsAuthorDate
mlPrinting PDF files Nat! Jan 8, 16:17
mlRe: Printing PDF files Avi Cherry Jan 8, 17:49
mlRe: Printing PDF files Ben Mackin Jan 8, 18:22
mlRe: Printing PDF files Avi Cherry Jan 8, 21:07
mlRe: Printing PDF files Nat! Jan 9, 15:20
mlRe: Printing PDF files Ben Mackin Jan 9, 16:13