---
title: "PMPresetGetAttributes(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1459042-pmpresetgetattributes
---

# PMPresetGetAttributes(_:_:)

Obtains the attributes of a preset.

## Declaration

```swift
func PMPresetGetAttributes(_ preset: PMPreset, _ attributes: UnsafeMutablePointer<Unmanaged<CFDictionary>?>) -> OSStatus
```

## Parameters

- `preset`: The preset whose attributes you want to obtain. You can use the function doc://com.apple.documentation/documentation/applicationservices/1459117-pmprintercopypresets to obtain the presets for a given printer.
- `attributes`: A pointer to your doc://com.apple.corefoundation/documentation/CoreFoundation/CFDictionary variable. On return, the variable refers to a Core Foundation dictionary containing the attributes of the specified preset, or NULL if the attributes could not be obtained. For more information about these attributes, see the Discussion. You should not release this dictionary without first retaining it.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion A preset has associated with it a dictionary containing the preset identifier, the localized name, and a description of the environment for which the preset is intended. In addition to these standard attributes, the preset you specify may contain additional attributes that reflect custom print settings.

## See Also

### Using Printer Presets

- [PMPresetCopyName(_:_:)](applicationservices/1460343-pmpresetcopyname.md)
- [PMPresetCreatePrintSettings(_:_:_:)](applicationservices/1463414-pmpresetcreateprintsettings.md)
