Instance Method

runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo:

Runs the modal page layout panel with the receiver’s printing information object.

Declaration

- (void)runModalPageLayoutWithPrintInfo:(NSPrintInfo *)printInfo delegate:(id)delegate didRunSelector:(SEL)didRunSelector contextInfo:(void *)contextInfo;

Parameters

printInfo

The NSPrintInfo object for the page layout panel to use.

delegate

The delegate to which the selector message is sent.

didRunSelector

The selector of the message sent to the delegate.

contextInfo

Object passed with the callback to provide any additional context information.

Discussion

Invoked from the action method runPageLayout:. Presents the page layout panel app modally if there is no document window to which it can be presented document modally.

When the panel is dismissed, delegate is sent a didRunSelector message. The didRunSelector callback method should have the following signature:

- (void)documentDidRunModalPageLayout:(NSDocument *)document accepted:(BOOL)accepted  contextInfo:(void *)contextInfo

See Also

Printing the Document

printInfo

The printing information associated with the document.

- preparePageLayout:

Adds document-specific content to the Page Layout panel.

- runModalPrintOperation:delegate:didRunSelector:contextInfo:

Runs the specified print operation modally.

- shouldChangePrintInfo:

Returns a Boolean value that indicates whether the document allows changes to the default printing information.

- printDocumentWithSettings:showPrintPanel:delegate:didPrintSelector:contextInfo:

Prints the document's contents, optionally displaying a print panel to the user.

- printOperationWithSettings:error:

Creates and returns a print operation for the document's contents.

PDFPrintOperation

A print operation you can use to create a PDF representation of the document’s current contents.

- saveDocumentToPDF:

Exports a PDF representation of the document’s current contents.