O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSPrintInfo — Mac OS X 10.0

Synopsis

This class encapsulates the information related to a print job, such as margin sizes, paper orientation, pagination type, and how the view contents should be positioned on the printed output (centered vertically, horizontally, no centering, etc.). Each application has a shared print info object that is used by default for all print jobs. This object is obtained using the class method sharedPrintInfo.

image with no caption

@interface NSPrintInfo : NSObject <NSCoding, NSCopying>
                                  // Initializers
   - (id)initWithDictionary:(NSDictionary *)attributes;
                                  // Accessor Methods
   - (void)setUpPrintOperationDefaultValues;
   - (void)setHorizontallyCentered:(BOOL)flag;
   - (void)setPaperName:(NSString *)name;
   - (NSString *)paperName;
   - (void)setPaperSize:(NSSize)size;
   - (NSSize)paperSize;
   - (void)setOrientation:(NSPrintingOrientation)orientation;
   - (NSPrintingOrientation)orientation;
   - (void)setPrinter:(NSPrinter *)printer;
   - (NSPrinter *)printer;
   - (void)setJobDisposition:(NSString *)disposition;
   - (NSString *)jobDisposition;
   - (void)setHorizontalPagination:(NSPrintingPaginationMode)mode;
   - (NSPrintingPaginationMode)horizontalPagination;
   - (void)setRightMargin:(float)margin;
   - (float)rightMargin;
   - (void)setTopMargin:(float)margin;
   - (float)topMargin;
   - (void)setLeftMargin:(float)margin;
   - (float)leftMargin;
   - (void)setVerticallyCentered ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required