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

NSPrintOperation — Mac OS X 10.0

Synopsis

Instances of this class work with NSView and NSPrintInfo objects to coordinate the generation of EPS or PDF data suitable for output to a printer device. In Cocoa’s printing system, NSPrintInfo objects provide information about output settings such as paper size and margin widths, while NSView objects are responsible for creating the actual output with the same standard drawing APIs used for onscreen drawing.

image with no caption

@interface NSPrintOperation : NSObject
                                  // Accessor Methods
   - (void)setPageOrder:(NSPrintingPageOrder)order;
   - (NSPrintingPageOrder)pageOrder;
   - (void)setCanSpawnSeparateThread:(BOOL)canSpawnSeparateThread;
   - (BOOL)canSpawnSeparateThread;
   - (void)setJobStyleHint:(NSString *)hint;
   - (NSString *)jobStyleHint;
   - (void)setPrintInfo:(NSPrintInfo *)aPrintInfo;
   - (NSPrintInfo *)printInfo;
   - (void)setAccessoryView:(NSView *)aView;
   - (NSView *)accessoryView;
   - (void)setPrintPanel:(NSPrintPanel *)panel;
   - (NSPrintPanel *)printPanel;
   - (void)setShowPanels:(BOOL)flag;
   - (BOOL)showPanels;
                                  // Class Methods
   + (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
                                 insideRect:(NSRect)rect 
                                 toData:(NSMutableData *)data;
   + (NSPrintOperation *)EPSOperationWithView:(NSView *)aView
                                 insideRect:(NSRect)rect 
                                 toData:(NSMutableData *)data 
                                 printInfo:(NSPrintInfo *)aPrintInfo;
   + (NSPrintOperation *)EPSOperationWithView ...

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