---
title: PMSessionSetCurrentPrinter
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/core_printing/1805523-pmsessionsetcurrentprinter
---

# PMSessionSetCurrentPrinter

Changes the current printer for a printing session to a printer specified by name.

## Declaration

```occ
OSStatus PMSessionSetCurrentPrinter (
   PMPrintSession session,
   CFStringRef printerName
);
```

## Parameters

- `session`: The printing session whose printer you want to change.
- `printerName`: The name of the printer you want to set as the current printer.

## Return Value

A result code. See [Result Codes](../core_printing.md).

## Overview

You must call this function between the creation and release of a printing session. See the function [PMCreateSession](../1463247-pmcreatesession.md).

## See Also

### Accessing Data in Printing Session Objects

- [PMSessionGetDataFromSession](../1462964-pmsessiongetdatafromsession.md)
- [PMSessionSetDataInSession](../1461902-pmsessionsetdatainsession.md)
- [PMSessionGetCurrentPrinter](../1458998-pmsessiongetcurrentprinter.md)
- [PMSessionSetCurrentPMPrinter](../1461096-pmsessionsetcurrentpmprinter.md)
- [PMSessionGetDocumentFormatGeneration](1805525-pmsessiongetdocumentformatgenera.md)
- [PMSessionSetDocumentFormatGeneration](1805527-pmsessionsetdocumentformatgenera.md)
- [PMSessionGetCGGraphicsContext](../1461952-pmsessiongetcggraphicscontext.md)
- [PMSessionGetGraphicsContext](1805529-pmsessiongetgraphicscontext.md)
- [PMSessionError](../1460003-pmsessionerror.md)
- [PMSessionSetError](../1460216-pmsessionseterror.md)
- [PMSessionGeneral](1805530-pmsessiongeneral.md)
