---
title: "init(dictionary:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsprintinfo/init(dictionary:)"
---

# init(dictionary:)

Returns a printing information object initialized with the parameters in the specified dictionary.

## Declaration

```swift
init(dictionary attributes: [NSPrintInfo.AttributeKey : Any])
```

## Parameters

- `attributes`: The possible key-value pairs contained in aDictionary are described in Constants.

## Return Value

Return Value An initialized NSPrintInfo object, or nil if the object could not be created.

## Discussion

Discussion This method is the designated initializer for this class. Non-object values should be stored in NSValue objects (or an appropriate subclass like NSNumber) in the dictionary. See NSNumber for a list of types which should be stored using the NSNumber class; otherwise use NSValue.

## See Also

### Related Documentation

- [NSPrintInfo](appkit/nsprintinfo.md)
- [dictionary()](appkit/nsprintinfo/dictionary().md)

### Creating the Printing Information Object

- [shared](appkit/nsprintinfo/shared.md)
- [init()](appkit/nsprintinfo/init().md)
- [init(coder:)](appkit/nsprintinfo/init(coder:).md)
