---
title: PMGetPrintSettingsExtendedData
framework: Application Services
role: pseudoSymbol
platforms: []
path: applicationservices/core_printing/1805488-pmgetprintsettingsextendeddata
---

# PMGetPrintSettingsExtendedData

Obtains extended print settings data previously stored by your application.

## Declaration

```occ
OSStatus PMGetPrintSettingsExtendedData (
   PMPrintSettings printSettings,
   OSType dataID,
   UInt32 *size,
   void *extendedData
);
```

## Parameters

- `printSettings`: The print settings object whose extended data you want to obtain.
- `dataID`: The unique 4-character code of the data to retrieve. This is typically your application’s creator code. However, if your creator code is outside the ASCII 7-bit character range 0x20–0x7F, you need to use a different 4-character code.
- `size`: A pointer to a value that specifies the size of the buffer you have allocated for the extended print settings data. On return, this variable contains the number of bytes read into the buffer or the size of the extended data. You can pass the constant `kPMDontWantSize` if you do not need this information. (See [doc://com.apple.documentation/documentation/applicationservices/core_printing/data_not_wanted_constants](applicationservices/core_printing/data_not_wanted_constants.md) for more information.)
- `extendedData`: A pointer to a buffer to receive the extended data. Pass the constant `kPMDontWantData` if you do not want to read the data. (See [doc://com.apple.documentation/documentation/applicationservices/core_printing/data_not_wanted_constants](applicationservices/core_printing/data_not_wanted_constants.md) for more information.)

## Return Value

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

## Overview

Your application typically needs to call `PMGetPrintSettingsExtendedData` two times in order to retrieve the extended print settings data. The first time, pass the constant `kPMDontWantData` in the `extendedData` parameter to obtain the buffer size required for the extended data. Then allocate the buffer and call the function a second time to read the extended data into your buffer.

You may find it easier to use the functions [PMPrintSettingsSetValue](../1461697-pmprintsettingssetvalue.md) and [PMPrintSettingsGetValue](../1460602-pmprintsettingsgetvalue.md) to store and retrieve user-defined data in a print settings object. If you use these functions, make sure that the custom keys you define for your private data do not conflict with other print settings keys.

## See Also

### Accessing Data in Print Settings Objects

- [PMSetPrintSettingsExtendedData](1805491-pmsetprintsettingsextendeddata.md)
- [PMGetFirstPage](../1460271-pmgetfirstpage.md)
- [PMSetFirstPage](../1461519-pmsetfirstpage.md)
- [PMGetLastPage](../1462747-pmgetlastpage.md)
- [PMSetLastPage](../1463595-pmsetlastpage.md)
- [PMGetPageRange](../1459324-pmgetpagerange.md)
- [PMSetPageRange](../1462294-pmsetpagerange.md)
- [PMPrintSettingsGetJobName](../1459233-pmprintsettingsgetjobname.md)
- [PMPrintSettingsSetJobName](../1460149-pmprintsettingssetjobname.md)
- [PMGetCopies](../1464480-pmgetcopies.md)
- [PMSetCopies](../1463804-pmsetcopies.md)
- [PMGetCollate](../1464492-pmgetcollate.md)
- [PMSetCollate](../1463223-pmsetcollate.md)
- [PMGetDuplex](../1458921-pmgetduplex.md)
- [PMSetDuplex](../1462000-pmsetduplex.md)
- [PMPrintSettingsGetValue](../1460602-pmprintsettingsgetvalue.md)
- [PMPrintSettingsSetValue](../1461697-pmprintsettingssetvalue.md)
- [PMPrintSettingsCopyAsDictionary](../1459088-pmprintsettingscopyasdictionary.md)
- [PMPrintSettingsCopyKeys](../1462730-pmprintsettingscopykeys.md)
- [PMGetJobNameCFString](1805513-pmgetjobnamecfstring.md)
- [PMSetJobNameCFString](1805515-pmsetjobnamecfstring.md)
