---
title: "PMGetAdjustedPaperRect(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1459167-pmgetadjustedpaperrect
---

# PMGetAdjustedPaperRect(_:_:)

Obtains the rectangle defining the paper size, taking into account orientation, application drawing resolution, and scaling settings.

## Declaration

```swift
func PMGetAdjustedPaperRect(_ pageFormat: PMPageFormat, _ paperRect: UnsafeMutablePointer<PMRect>) -> OSStatus
```

## Parameters

- `pageFormat`: The page format object whose adjusted paper rectangle you want to obtain.
- `paperRect`: A pointer to your doc://com.apple.documentation/documentation/applicationservices/core_printing/pmrect structure. On return, the structure describes the current paper size, in points, taking into account scaling, rotation, and application resolution settings. The coordinates of the upper-left corner of the paper rectangle are specified relative to the page rectangle. The coordinates of the upper-left corner of the page rectangle are always (0,0), which means the coordinates of the upper-left corner of the paper rectangle are always negative or (0,0). See Supporting Printing in Your Carbon Application for more information on page and paper rectangles.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Before using this function, you must call the function PMSessionValidatePageFormat(_:_:_:) to ensure that the values for the adjusted paper rectangle correctly account for scaling, rotation, and application resolution settings.

## See Also

### Accessing Data in Page Format Objects

- [PMGetPageFormatExtendedData(_:_:_:_:)](applicationservices/1464455-pmgetpageformatextendeddata.md)
- [PMSetPageFormatExtendedData(_:_:_:_:)](applicationservices/1463464-pmsetpageformatextendeddata.md)
- [PMGetPageFormatPaper(_:_:)](applicationservices/1461319-pmgetpageformatpaper.md)
- [PMPageFormatGetPrinterID(_:_:)](applicationservices/1462961-pmpageformatgetprinterid.md)
- [PMGetOrientation(_:_:)](applicationservices/1459144-pmgetorientation.md)
- [PMSetOrientation(_:_:_:)](applicationservices/1459016-pmsetorientation.md)
- [PMGetScale(_:_:)](applicationservices/1458796-pmgetscale.md)
- [PMSetScale(_:_:)](applicationservices/1463343-pmsetscale.md)
- [PMGetAdjustedPageRect(_:_:)](applicationservices/1461543-pmgetadjustedpagerect.md)
- [PMGetUnadjustedPageRect(_:_:)](applicationservices/1462944-pmgetunadjustedpagerect.md)
- [PMGetUnadjustedPaperRect(_:_:)](applicationservices/1462939-pmgetunadjustedpaperrect.md)
