Name
NSPrinter — Mac OS X 10.0
Synopsis
This class represents a printer as it is described in its
PPD file. Using
this class, applications can obtain information about any of the
printers found in the Print Center application. To create an instance
of NSPrint, use either the method
printerWithName: or the method
printerWithType:. If the printer indicated by the
name or type does not exist in the Print Center printer list, these
methods will return nil. In these methods,
Type refers to the make and model of the
printer, while Name refers to the name given to
the printer in Print Center. Applications can obtain arrays of the
names and types of available printers by invoking the class methods
printerNames and printerTypes,
respectively.
|
![]()
|
@interface NSPrinter : NSObject <NSCoding, NSCopying>
|
// Convenience Constructors
|
+ (NSArray *)printerNames;
|
+ (NSArray *)printerTypes;
|
+ (NSPrinter *)printerWithName:(NSString *)name; |
+ (NSPrinter *)printerWithName:(NSString *)name domain:(NSString *)domain includeUnavailable:(BOOL)flag; |
+ (NSPrinter *)printerWithType:(NSString *)type; |
// Instance Methods
|
- (BOOL)acceptsBinary;
|
- (BOOL)booleanForKey:(NSString *)key inTable:(NSString *)table; |
- (NSDictionary *)deviceDescription;
|
- (NSString *)domain;
|
- (float)floatForKey:(NSString *)key inTable:(NSString *)table; |
- (NSString *)host;
|
- (NSRect)imageRectForPaper:(NSString ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access
