---
title: "PMGetOrientation(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1459144-pmgetorientation
---

# PMGetOrientation(_:_:)

Obtains the current setting for page orientation.

## Declaration

```swift
func PMGetOrientation(_ pageFormat: PMPageFormat, _ orientation: UnsafeMutablePointer<PMOrientation>) -> OSStatus
```

## Parameters

- `pageFormat`: The page format object whose orientation you want to obtain.
- `orientation`: A pointer to your PMOrientation variable. On return, the variable contains a constant value indicating the page orientation. Supported values are: kPMPortrait kPMLandscape kPMReversePortrait (supported in macOS 10.5 and later) kPMReverseLandscape See doc://com.apple.documentation/documentation/applicationservices/pmorientation for a complete description of the page orientation constants.

## Return Value

Return Value A result code. See Result Codes.

## 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)
- [PMSetOrientation(_:_:_:)](applicationservices/1459016-pmsetorientation.md)
- [PMGetScale(_:_:)](applicationservices/1458796-pmgetscale.md)
- [PMSetScale(_:_:)](applicationservices/1463343-pmsetscale.md)
- [PMGetAdjustedPageRect(_:_:)](applicationservices/1461543-pmgetadjustedpagerect.md)
- [PMGetAdjustedPaperRect(_:_:)](applicationservices/1459167-pmgetadjustedpaperrect.md)
- [PMGetUnadjustedPageRect(_:_:)](applicationservices/1462944-pmgetunadjustedpagerect.md)
- [PMGetUnadjustedPaperRect(_:_:)](applicationservices/1462939-pmgetunadjustedpaperrect.md)
