---
title: "PMSetDuplex(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1462000-pmsetduplex
---

# PMSetDuplex(_:_:)

Sets the duplex mode.

## Declaration

```swift
func PMSetDuplex(_ printSettings: PMPrintSettings, _ duplexSetting: PMDuplexMode) -> OSStatus
```

## Parameters

- `printSettings`: The print settings object whose duplex mode you want to set.
- `duplexSetting`: The new duplex mode setting. Possible values include: kPMDuplexNone (one-sided printing) kPMDuplexNoTumble (two-sided printing) kPMDuplexTumble (two-sided printing with tumbling) See doc://com.apple.documentation/documentation/applicationservices/pmduplexmode for a full description of the constants you can use to specify the new setting.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion Duplex printing is a print job that prints on both sides of the paper. Two-Sided printing controls are displayed in the Layout pane of the Print dialog. This function allows you to specify whether the document should be printed single-sided, double-sided with short-edge binding, or double-sided with long-edge binding.   note: Not all printers support duplex printing. This function specifies a setting that might not be available on a given destination. If you call this function after initiating a print job, the change is ignored for the current job.

## See Also

### Accessing Data in Print Settings Objects

- [PMGetFirstPage(_:_:)](applicationservices/1460271-pmgetfirstpage.md)
- [PMSetFirstPage(_:_:_:)](applicationservices/1461519-pmsetfirstpage.md)
- [PMGetLastPage(_:_:)](applicationservices/1462747-pmgetlastpage.md)
- [PMSetLastPage(_:_:_:)](applicationservices/1463595-pmsetlastpage.md)
- [PMGetPageRange(_:_:_:)](applicationservices/1459324-pmgetpagerange.md)
- [PMSetPageRange(_:_:_:)](applicationservices/1462294-pmsetpagerange.md)
- [PMPrintSettingsGetJobName(_:_:)](applicationservices/1459233-pmprintsettingsgetjobname.md)
- [PMPrintSettingsSetJobName(_:_:)](applicationservices/1460149-pmprintsettingssetjobname.md)
- [PMGetCopies(_:_:)](applicationservices/1464480-pmgetcopies.md)
- [PMSetCopies(_:_:_:)](applicationservices/1463804-pmsetcopies.md)
- [PMGetCollate(_:_:)](applicationservices/1464492-pmgetcollate.md)
- [PMSetCollate(_:_:)](applicationservices/1463223-pmsetcollate.md)
- [PMGetDuplex(_:_:)](applicationservices/1458921-pmgetduplex.md)
- [PMPrintSettingsGetValue(_:_:_:)](applicationservices/1460602-pmprintsettingsgetvalue.md)
- [PMPrintSettingsSetValue(_:_:_:_:)](applicationservices/1461697-pmprintsettingssetvalue.md)
- [PMPrintSettingsCopyAsDictionary(_:_:)](applicationservices/1459088-pmprintsettingscopyasdictionary.md)
- [PMPrintSettingsCopyKeys(_:_:)](applicationservices/1462730-pmprintsettingscopykeys.md)
