Class

NSPrinter

An object that describes a printer’s capabilities.

Declaration

@interface NSPrinter : NSObject

Overview

NSPrinter provides information about a printer; it does not modify printer attributes or control a printing job. A printer object can be constructed by specifying either the printer name or the make and model of an available printer. Typically, Cocoa apps don't create NSPrinter objects; instead, the printing system uses these objects to support the printing jobs and when it shows users a list of printers.

Topics

Creating an NSPrinter

+ printerWithName:

Creates and returns an NSPrinter object initialized with the specified printer name.

+ printerWithType:

Creates and returns an NSPrinter object initialized to the first available printer with the specified make and model information.

Getting General Printer Information

printerNames

Returns the names of all available printers.

printerTypes

Returns descriptions of the makes and models of all available printers.

Getting Attributes

name

Returns the printer’s name.

type

Returns a description of the printer’s make and model.

Getting Specific Information

- pageSizeForPaper:

Returns the size of the page for the specified paper type.

languageLevel

Returns the PostScript language level recognized by the printer.

Querying the Tables

deviceDescription

Returns a dictionary of keys and values describing the device.

Deprecated Methods

- isKey:inTable:

Returns a Boolean value indicating whether the specified key is in the specified table.

Deprecated
- stringForKey:inTable:

Returns the first occurrence of a value associated with specified key.

Deprecated
- stringListForKey:inTable:

Returns an array of strings, one for each occurrence, associated with specified key.

Deprecated
- booleanForKey:inTable:

Returns the Boolean value associated with the specified key.

Deprecated
- floatForKey:inTable:

Returns the floating-point value associated with the specified key.

Deprecated
- intForKey:inTable:

Returns the integer value associated with the specified key.

Deprecated
- rectForKey:inTable:

Returns the rectangle associated with the specified key.

Deprecated
- sizeForKey:inTable:

Returns the size data type associated with the specified key.

Deprecated
- statusForTable:

Returns the status of the specified table.

Deprecated
NSPrinterTableStatus

These constants describe the state of a printer information table stored by an NSPrinter object.

- acceptsBinary

Deprecated.

Deprecated
- domain

Deprecated.

Deprecated
- host

Deprecated.

Deprecated
- imageRectForPaper:

Deprecated.

Deprecated
- isColor

Deprecated.

Deprecated
- isFontAvailable:

Deprecated.

Deprecated
- isOutputStackInReverseOrder

Deprecated.

Deprecated
- note

Deprecated.

Deprecated

Relationships

Inherits From

Conforms To

See Also

Print Job Information

NSPrintInfo

An object that stores information that’s used to generate printed output.

NSPrintOperation

An object that controls operations that generate Encapsulated PostScript (EPS) code, Portable Document Format (PDF) code, or print jobs.