Instance Method

locationOfPrintRect:

Invoked by print: to determine the location of the region of the view being printed on the physical page.

Declaration

- (NSPoint)locationOfPrintRect:(NSRect)rect;

Parameters

aRect

A rectangle defining a region of the view; it is expressed in the default coordinate system of the page.

Return Value

A point to be used for setting the origin for aRect, whose size the view can examine in order to properly place it. It is expressed in the default coordinate system of the page.

Discussion

The default implementation places aRect according to the status of the NSPrintInfo object for the print job. By default it places the image in the upper-left corner of the page, but if the NSPrintInfo methods horizontallyCentered or verticallyCentered return YES, it centers a single-page image along the appropriate axis. A multiple-page document, however, is always placed so the divided pieces can be assembled at their edges.

See Also

Pagination

heightAdjustLimit

The fraction of the page that can be pushed onto the next page during automatic pagination to prevent items such as lines of text from being divided across pages.

widthAdjustLimit

The fraction of the page that can be pushed onto the next page during automatic pagination to prevent items such as small images or text columns from being divided across pages.

- adjustPageWidthNew:left:right:limit:

Overridden by subclasses to adjust page width during automatic pagination.

- adjustPageHeightNew:top:bottom:limit:

Overridden by subclasses to adjust page height during automatic pagination.

- knowsPageRange:

Returns YES if the view handles page boundaries, NO otherwise.

- rectForPage:

Implemented by subclasses to determine the portion of the view to be printed for the specified page number.