---
title: "PMPageFormatGetPrinterID(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1462961-pmpageformatgetprinterid
---

# PMPageFormatGetPrinterID(_:_:)

Obtains the identifier of the formatting printer for a page format object.

## Declaration

```swift
func PMPageFormatGetPrinterID(_ pageFormat: PMPageFormat, _ printerID: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus
```

## Parameters

- `pageFormat`: The page format object whose printer identifier you want to obtain.
- `printerID`: A pointer to your doc://com.apple.corefoundation/documentation/CoreFoundation/CFString variable. On return, the variable refers to a Core Foundation string that contains the identifier of the formatting printer for the specified page format object. If the page format object does not have that information, the variable is set to NULL. You should not release the string without first retaining it.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Page format objects can be created a number of different ways and some of them do not require a specific printer. If the printer ID is known, the printer is displayed in the Page Setup dialog’s Format for pop-up menu. If the printer ID is not known, the default formatting printer is the generic Any Printer. The printing system provides default page and paper sizes for the generic printer.

## See Also

### Accessing Data in Page Format Objects

- [PMGetPageFormatExtendedData(_:_:_:_:)](applicationservices/1464455-pmgetpageformatextendeddata.md)
- [PMSetPageFormatExtendedData(_:_:_:_:)](applicationservices/1463464-pmsetpageformatextendeddata.md)
- [PMGetPageFormatPaper(_:_:)](applicationservices/1461319-pmgetpageformatpaper.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)
- [PMGetAdjustedPaperRect(_:_:)](applicationservices/1459167-pmgetadjustedpaperrect.md)
- [PMGetUnadjustedPageRect(_:_:)](applicationservices/1462944-pmgetunadjustedpagerect.md)
- [PMGetUnadjustedPaperRect(_:_:)](applicationservices/1462939-pmgetunadjustedpaperrect.md)
