Instance Method


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


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



The NSPrintInfo object for the page layout panel to use.


The delegate to which the selector message is sent.


The selector of the message sent to the delegate.


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


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 Documents


The printing information associated with the document.

- preparePageLayout:

Invoked by runModalPageLayoutWithPrintInfo: and runModalPageLayoutWithPrintInfo:delegate:didRunSelector:contextInfo: to do any customization of the Page Layout panel pageLayout, such as adding an accessory view.

- runModalPrintOperation:delegate:didRunSelector:contextInfo:

Runs the specified print operation modally.

- shouldChangePrintInfo:

Returns a Boolean value indicating whether the receiver should allow changes to the default NSPrintInfo object used in printing the document.

- printOperationWithSettings:error:

Creates a print operation and returns it if successful.


A print operation that 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.