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.
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 mails | Author | Date |
|---|---|---|
| Nat! | Jan 8, 16:17 | |
| Avi Cherry | Jan 8, 17:49 | |
| Ben Mackin | Jan 8, 18:22 | |
| Avi Cherry | Jan 8, 21:07 | |
| Nat! | Jan 9, 15:20 | |
| Ben Mackin | Jan 9, 16:13 |






Cocoa mail archive

