---
title: "PMPrintSettingsCreateWithDataRepresentation(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1462203-pmprintsettingscreatewithdatarep
---

# PMPrintSettingsCreateWithDataRepresentation(_:_:)

Creates a print settings object from a data representation.

## Declaration

```swift
func PMPrintSettingsCreateWithDataRepresentation(_ data: CFData, _ printSettings: UnsafeMutablePointer<PMPrintSettings?>) -> OSStatus
```

## Parameters

- `data`: The data representation of a print settings object. The data representation must have been previously created with the function doc://com.apple.documentation/documentation/applicationservices/1464570-pmprintsettingscreatedatareprese.
- `printSettings`: A pointer to your doc://com.apple.documentation/documentation/applicationservices/pmprintsettings variable. On return, the variable refers to a new print settings object that contains the printing information stored in the specified data object. You are responsible for releasing the print settings object with the function doc://com.apple.documentation/documentation/applicationservices/1461402-pmrelease.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion This function is typically used to convert a data representation stored in a user document back into a print settings object. For information about creating a Core Foundation data object from raw data, see CFData. After calling this function, you should call the function PMSessionValidatePrintSettings(_:_:_:) to make sure the print settings object contains valid values.

## 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)
- [PMCopyPrintSettings(_:_:)](applicationservices/1462491-pmcopyprintsettings.md)
- [PMPrintSettingsToOptions(_:_:)](applicationservices/1459069-pmprintsettingstooptions.md)
- [PMPrintSettingsToOptionsWithPrinterAndPageFormat(_:_:_:_:)](applicationservices/1459435-pmprintsettingstooptionswithprin.md)
