---
title: "PMSetScale(_:_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1463343-pmsetscale
---

# PMSetScale(_:_:)

Sets the scaling factor for the page and paper rectangles.

## Declaration

```swift
func PMSetScale(_ pageFormat: PMPageFormat, _ scale: Double) -> OSStatus
```

## Parameters

- `pageFormat`: The page format object whose scaling factor you want to set.
- `scale`: The desired scaling factor expressed as a percentage. For example, for 50 percent scaling, pass a value of 50.0; for no scaling, pass 100.0.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion You can call the function PMSetScale to change the scaling factor that appears when your application invokes the Page Setup dialog. If you call PMSetScale after calling PMSessionPageSetupDialog, make sure you call PMSessionValidatePageFormat(_:_:_:) before you call PMSessionBeginCGDocument or PMSessionBeginDocument. If you call this function after initiating a print job, the change is ignored for the current job.

## See Also

### Accessing Data in Page Format Objects

- [PMGetPageFormatExtendedData(_:_:_:_:)](applicationservices/1464455-pmgetpageformatextendeddata.md)
- [PMSetPageFormatExtendedData(_:_:_:_:)](applicationservices/1463464-pmsetpageformatextendeddata.md)
- [PMGetPageFormatPaper(_:_:)](applicationservices/1461319-pmgetpageformatpaper.md)
- [PMPageFormatGetPrinterID(_:_:)](applicationservices/1462961-pmpageformatgetprinterid.md)
- [PMGetOrientation(_:_:)](applicationservices/1459144-pmgetorientation.md)
- [PMSetOrientation(_:_:_:)](applicationservices/1459016-pmsetorientation.md)
- [PMGetScale(_:_:)](applicationservices/1458796-pmgetscale.md)
- [PMGetAdjustedPageRect(_:_:)](applicationservices/1461543-pmgetadjustedpagerect.md)
- [PMGetAdjustedPaperRect(_:_:)](applicationservices/1459167-pmgetadjustedpaperrect.md)
- [PMGetUnadjustedPageRect(_:_:)](applicationservices/1462944-pmgetunadjustedpagerect.md)
- [PMGetUnadjustedPaperRect(_:_:)](applicationservices/1462939-pmgetunadjustedpaperrect.md)
