ftp.nice.ch/peanuts/GeneralData/Documents/openstep/OpenStepSpec_rtf.tar.gz#/OpenStepSpec_rtf/ApplicationKit/Classes/NSPrintInfo.rtf

This is NSPrintInfo.rtf in view mode; [Download] [Up]

paperh18648 margl-907 margr0 margt0 margb0 fi0 ri0 ql sb0 f1 fs24 Copyright f3 'e3f1 1994 by NeXT Computer, Inc.  All Rights Reserved.

s4 li100 fi0 ri1007 ql f0 b fs36 fs100 
fs36 NSPrintInfo 
pard s11 li2872 fi-2771 ri1007 ql tx2872 f1 b0 fs28 fs48 
fs28 f0 b fs24 Inherits From:tab b0 fs28 f1 NSObject
fs20 
fs28 s6 f0 b fs24 Conforms To:tab b0 fs28 f1 NSCoding, NSCopying
fi0 NSObject (NSObject)
fs20 
fs28 s7 fi-2771 f0 b fs24 Declared In:tab b0 fs28 f1 AppKit/NSPrintInfo.h 
fs20 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs28 fs20 
fs28 Class Description
fs14 
fs28 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 f1 b0 fs2 
fs28 An NSPrintInfo object stores information that'27s used during printing. A shared NSPrintInfo object is automatically created for an application and is used by default for all printing jobs for that application. You can create any number of additional NSPrintInfo objects; however, only one can be 'aaactive'ba at a time, as set through the b setSharedPrintInfo:b0  class method. The shared NSPrintInfo object is returned through the b sharedPrintInfob0  class method.
fs16 
fs28 An NSPrintInfo object is used by the NSPrintOperations class to control printing. If you create special instances of NSPrintInfo objects for a specific printing task, you must ensure that either the application'27s shared NSPrintInfo object is current, or you must instantiate an NSPrintOperations object using one of its methods that explicitly designate an NSPrintInfo object.
fs16 
fs28 Although you can set an NSPrintInfo'27s attributes through the methods it provides, this is usually the task of other objects, notably the NSPageLayout and NSPrintPanel objects. The NSView or NSWindow that'27s being printed may also supercede some NSPrintInfo settings. In particular, a NSView or NSWindow can supply the range of pages in the document and can provide its own pagination mechanism through theb  knowsPagesFirst:last:b0  and b rect:forPage:b0  methods (see the documentation of these methods in the NSView class for details).
fs16 
fs28 If the printed NSView or NSWindow doesn'27t supply a pagination, the NSPrintInfo'27s vertical and horizontal pagination constants are used to trigger built-in pagination mechanisms:
fs16 
fs28 pard s19 li854 fi0 ri1007 ql tx4509 tx10180 f0 b fs24 Pagination Constanttab Meaning
fs6 
fs24 pard s18 li4509 fi-3655 ri1007 ql tx4509 tx10432 f1 b0 fs28 fs10 
fs28 fi-3655 NSAutoPagination tab The image is diced into equal-sized rectangles and placed in one column of pages.
fs16 
fs28 fi-3655 fi-3655 NSFitPagination tab The image is scaled to produce one column or one row of pages.
fs16 
fs28 fi-3655 fi-3655 NSClipPaginationtab The image is clipped to produce one column or row of pages. 
fs16 
fs28 fi-3655 pard s1 li477 fi0 ri1007 ql tx2494 tx2872 tx3250 Vertical and horizontal pagination needn'27t be the same. However, if either dimension is scaled (NSFitPagination), the other dimension is scaled by the same amount to avoid stretching the image. If both dimensions are scaled, the scaling factor that produces the smallest image is used. Note that NSPrintInfo'27s scaling factor is independent of the scaling that'27s imposed by pagination and is applied after the document has been paginated.
fs16 
fs28 NSPrintInfo uses points as the unit of measurement for paper size and margin width in the methods below. See the NSFont specification for a discussion of points.
fs16 
fs28 pard s16 li100 fi0 ri1007 ql f0 b fs24 
fs28 Creating and Initializing an NSPrintInfo Instance 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (id)b initWithDictionary:b0 (NSDictionary *)i aDicti0 tab Initializes a newly allocated NSPrintInfo object by assigning it the parameters specified in i aDicti0 . This is the designated initializer for the class.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Managing the Shared NSPrintInfo Object 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (void)b setSharedPrintInfo:b0 (NSPrintInfo *)i printInfoi0 tab Sets the shared NSPrintInfo object to i printInfoi0 .
fi-6552 fs16 
fs28 fi-6552 + (NSPrintInfo *)b sharedPrintInfob0 tab Returns the shared NSPrintInfo object.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Managing the Printing Rectangle 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (NSSize)b sizeForPaperName:b0 (NSString *)i nametab i0 Returns the size for the specified type of paperi . namei0  identifies the type of paper, such as 'aaLetter'ba or 'aaLegal'ba. Paper names are implementation specific.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b bottomMargintab b0 Returns the height of the bottom margin.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b leftMargintab b0 Returns the width of the left margin.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSPrintingOrientation)b orientationb0 tab Returns whether the orientation is Portrait or Landscape. 
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSString *)b paperNameb0 tab Returns the paper type, such as 'aaLetter'ba or 'aaLegal'ba. Paper names are implementation specific.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSSize)b paperSizeb0 tab Returns the size of the paper.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b rightMargintab b0 Returns the width of the right margin.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setBottomMargin:b0 (float)i valuei0 tab Sets the bottom margin to i valuei0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setLeftMargin:b0 (float)i valuei0 tab Sets the left margin to i valuei0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setOrientation:b0 (NSPrintingOrientation)i modei0 tab Sets the orientation as Portrait or Landscape.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setPaperName:b0 (NSString *)i namei0 tab Sets the paper type. i namei0  identifies the type of paper, such as 'aaLetter'ba or 'aaLegal'ba. Paper names are implementation specific.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setPaperSize:b0 (NSSize)i sizei0 tab Sets the width and height of the paper.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setRightMargin:b0 (float)i valuei0 tab Sets the right margin to i valuei0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setTopMargin:b0 (float)i valuei0 tab Sets the top margin to i valuei0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (float)b topMargintab b0 Returns the height of the top margin.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Pagination 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSPrintingPaginationMode)b horizontalPaginationb0 tab Returns the horizontal pagination mode.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setHorizontalPagination:b0 (NSPrintingPaginationMode)i mode
s9 li7030 fi-6553 fi-5796 i0 tab Sets the horizontal pagination mode.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setVerticalPagination:b0 (NSPrintingPaginationMode)i mode
s9 li7030 fi-6553 fi-5796 i0 tab Sets the vertical pagination mode.
s8 li7029 fi-5794 fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSPrintingPaginationMode)b verticalPaginationb0 tab Returns the vertical pagination mode.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Positioning the Image on the Page 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (BOOL)b isHorizontallyCenteredb0 tab Returns whether the image is centered horizontally.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (BOOL)b isVerticallyCenteredb0 tab Returns whether the image is centered vertically.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setHorizontallyCentered:b0 (BOOL)i flagi0 tab Sets whether the image is centered horizontally.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setVerticallyCentered:b0 (BOOL)i flagi0 tab Sets whether the image is centered vertically.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Specifying the Printer 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 + (NSPrinter *)b defaultPrinterb0 tab Returns the user'27s default printer.
fi-6552 fs16 
fs28 fi-6552 + (void)b setDefaultPrinter:b0 (NSPrinter *)i printeri0 tab Sets the user'27s default printer.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (NSPrinter *)b printerb0 tab Returns the NSPrinter that'27s used for printing.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setPrinter:b0 (NSPrinter *)i aPrinteri0 tab Sets the printer that'27s used in subsequent printing jobs.
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Controlling Printing
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSString *)b jobDispositionb0 tab Returns the action specified for the job: printing, faxing, previewing, etc. See b setJobDisposition:b0 .
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setJobDisposition:b0 (NSString *)i dispositioni0 tab Sets the action specified for the job. i dispositioni0  can be one of NSPrintSpoolJob, NSPrintFaxJob, NSPrintPreviewJob, NSPrintSaveJob, NSPrintCancelJob.
fi-6552 fs16 
fs28 fi-6552 {f3 -} (void)b setUpPrintOperationDefaultValuestab b0 Allows the receiver to set any attribute that hasn'27t been previously set. 
pard s16 li100 fi0 ri1007 ql f0 b fs48 
fs28 Accessing the NSPrintInfo Object'27s Dictionary 
fs14 
fs28 pard s8 li7029 fi-6552 ri1007 ql tx6652 tx7030 f1 b0 fs2 
fs28 fi-6552 {f3 -} (NSMutableDictionary *)b dictionaryb0 tab Returns the NSPrintInfo object'27s dictionary.
}

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.