---
title: "PMCreatePageFormat(_:)"
framework: applicationservices
role: symbol
role_heading: Function
path: applicationservices/1459485-pmcreatepageformat
---

# PMCreatePageFormat(_:)

Creates a new page format object.

## Declaration

```swift
func PMCreatePageFormat(_ pageFormat: UnsafeMutablePointer<PMPageFormat?>) -> OSStatus
```

## Parameters

- `pageFormat`: A pointer to your doc://com.apple.documentation/documentation/applicationservices/pmpageformat variable. On return, the variable refers to a new page format object. You are responsible for releasing the page format object with the function doc://com.apple.documentation/documentation/applicationservices/1461402-pmrelease.

## Return Value

Return Value A result code. See Result Codes.

## Discussion

Discussion This function allocates memory for a new page format object in your application’s memory space and sets its reference count to 1. The new page format object is empty and unusable until you call PMSessionDefaultPageFormat(_:_:) or PMCopyPageFormat(_:_:).

## See Also

### Creating and Using Page Format Objects

- [PMCreatePageFormatWithPMPaper(_:_:)](applicationservices/1459274-pmcreatepageformatwithpmpaper.md)
- [PMCopyPageFormat(_:_:)](applicationservices/1464669-pmcopypageformat.md)
- [PMSessionDefaultPageFormat(_:_:)](applicationservices/1462217-pmsessiondefaultpageformat.md)
- [PMSessionValidatePageFormat(_:_:_:)](applicationservices/1459090-pmsessionvalidatepageformat.md)
- [PMSessionCreatePageFormatList(_:_:_:)](applicationservices/1463985-pmsessioncreatepageformatlist.md)
- [PMPageFormatCreateDataRepresentation(_:_:_:)](applicationservices/1464227-pmpageformatcreatedatarepresenta.md)
- [PMPageFormatCreateWithDataRepresentation(_:_:)](applicationservices/1462876-pmpageformatcreatewithdatarepres.md)
