---
title: "runPageLayout(_:)"
framework: appkit
role: symbol
role_heading: Instance Method
path: "appkit/nsdocument/runpagelayout(_:)"
---

# runPageLayout(_:)

The action method invoked in the receiver as first responder when the user chooses the Page Setup menu command.

## Declaration

```swift
@IBAction func runPageLayout(_ sender: Any?)
```

## Parameters

- `sender`: The control sending the message.

## Discussion

Discussion The default implementation invokes runModalPageLayout(with:delegate:didRun:contextInfo:) with the document’s current NSPrintInfo object as argument; if the user clicks the OK button and the document authorizes changes to its printing information (shouldChangePrintInfo(_:)), the method sets the document’s new NSPrintInfo object and increments the document’s change count.

## See Also

### Related Documentation

- [updateChangeCount(_:)](appkit/nsdocument/updatechangecount(_:).md)
- [printInfo](appkit/nsdocument/printinfo.md)

### Handling User Actions

- [printDocument(_:)](appkit/nsdocument/printdocument(_:).md)
- [revertToSaved(_:)](appkit/nsdocument/reverttosaved(_:).md)
- [save(_:)](appkit/nsdocument/save(_:).md)
- [saveAs(_:)](appkit/nsdocument/saveas(_:).md)
- [saveTo(_:)](appkit/nsdocument/saveto(_:).md)
- [save(withDelegate:didSave:contextInfo:)](appkit/nsdocument/save(withdelegate:didsave:contextinfo:).md)
