---
title: "PMPrintSettingsToOptions(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1459069-pmprintsettingstooptions
---

# PMPrintSettingsToOptions(_:_:)

Converts print settings into a CUPS options string.

## Declaration

```swift
func PMPrintSettingsToOptions(_ settings: PMPrintSettings, _ options: UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>) -> OSStatus
```

## Parameters

- `settings`: The print settings to convert.
- `options`: A pointer to a C string. On return, a CUPS options string describing the print settings, or NULL if the print settings could not be converted. The function allocates storage for the string. You are responsible for freeing the storage.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion This function creates a CUPS options string that captures the data in the specified print settings object. In macOS 10.5 and later, Apple recommends that you use the PMPrintSettingsToOptionsWithPrinterAndPageFormat(_:_:_:_:) function instead.

## See Also

### Creating and Using Print Settings Objects

- [PMCreatePrintSettings(_:)](applicationservices/1463239-pmcreateprintsettings.md)
- [PMSessionDefaultPrintSettings(_:_:)](applicationservices/1460138-pmsessiondefaultprintsettings.md)
- [PMSessionValidatePrintSettings(_:_:_:)](applicationservices/1458994-pmsessionvalidateprintsettings.md)
- [PMPrintSettingsCreateDataRepresentation(_:_:_:)](applicationservices/1464570-pmprintsettingscreatedatareprese.md)
- [PMPrintSettingsCreateWithDataRepresentation(_:_:)](applicationservices/1462203-pmprintsettingscreatewithdatarep.md)
- [PMCopyPrintSettings(_:_:)](applicationservices/1462491-pmcopyprintsettings.md)
- [PMPrintSettingsToOptionsWithPrinterAndPageFormat(_:_:_:_:)](applicationservices/1459435-pmprintsettingstooptionswithprin.md)
