---
title: "PMSessionCopyDestinationFormat(_:_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1464266-pmsessioncopydestinationformat
---

# PMSessionCopyDestinationFormat(_:_:_:)

Obtains the destination format for a print job.

## Declaration

```swift
func PMSessionCopyDestinationFormat(_ printSession: PMPrintSession, _ printSettings: PMPrintSettings, _ destFormatP: UnsafeMutablePointer<Unmanaged<CFString>?>) -> OSStatus
```

## Parameters

- `printSession`: The printing session that provides a context for the print job.
- `printSettings`: The print settings object for the print job whose destination format you want to obtain.
- `destFormatP`: 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 destination format for the print job. You are responsible for releasing the string. Currently, there are two possible values: kPMDocumentFormatPDF or kPMDocumentFormatPostScript. If an error occurs, the variable is set to NULL. If the function executes without error and the variable is set to NULL, the print job is set to use the default destination format.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion You must call this function between the creation and release of a printing session. See the function PMCreateSession(_:).

## See Also

### Accessing the Print Job Destination

- [PMSessionSetDestination(_:_:_:_:_:)](applicationservices/1459855-pmsessionsetdestination.md)
- [PMSessionGetDestinationType(_:_:_:)](applicationservices/1461071-pmsessiongetdestinationtype.md)
- [PMSessionCopyDestinationLocation(_:_:_:)](applicationservices/1462967-pmsessioncopydestinationlocation.md)
- [PMSessionCopyOutputFormatList(_:_:_:)](applicationservices/1461332-pmsessioncopyoutputformatlist.md)
