<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrinter/pageSize(forPaper:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPrinter(im)pageSizeForPaper:"
  },
  "title" : "pageSize(forPaper:)"
}
-->

# pageSize(forPaper:)

Returns the size of the page for the specified paper type.

```
func pageSize(forPaper paperName: NSPrinter.PaperName) -> NSSize
```

## Parameters

`paperName`

Possible values are printer-dependent and are contained in the printer’s PPD file. Typical values are “Letter” and “Legal”.

## Return Value

The size of the page, measured in points in the user coordinate space. The returned size is zero if the specified paper name is not recognized or its entry in the PPD file cannot be parsed.

## See Also

[`-  imageRectForPaper:`](/documentation/AppKit/NSPrinter/imageRectForPaper:)

Deprecated.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)