---
title: "PMSessionSetCurrentPMPrinter(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1461096-pmsessionsetcurrentpmprinter
---

# PMSessionSetCurrentPMPrinter(_:_:)

Changes the current printer for a printing session.

## Declaration

```swift
func PMSessionSetCurrentPMPrinter(_ session: PMPrintSession, _ printer: PMPrinter) -> OSStatus
```

## Parameters

- `session`: The printing session whose printer you want to change.
- `printer`: The new printer for the printing session.

## 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 Data in Printing Session Objects

- [PMSessionGetDataFromSession(_:_:_:)](applicationservices/1462964-pmsessiongetdatafromsession.md)
- [PMSessionSetDataInSession(_:_:_:)](applicationservices/1461902-pmsessionsetdatainsession.md)
- [PMSessionGetCurrentPrinter(_:_:)](applicationservices/1458998-pmsessiongetcurrentprinter.md)
- [PMSessionGetCGGraphicsContext(_:_:)](applicationservices/1461952-pmsessiongetcggraphicscontext.md)
- [PMSessionError(_:)](applicationservices/1460003-pmsessionerror.md)
- [PMSessionSetError(_:_:)](applicationservices/1460216-pmsessionseterror.md)
