<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSPrintInfo/init(dictionary:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSPrintInfo(im)initWithDictionary:"
  },
  "title" : "init(dictionary:)"
}
-->

# init(dictionary:)

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

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

## Parameters

`attributes`

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

## Return Value

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

## 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 <doc://com.apple.documentation/documentation/Foundation/NSNumber> for a list of types which should be stored using the `NSNumber` class; otherwise use `NSValue`.

## See Also

[`NSPrintInfo`](/documentation/AppKit/NSPrintInfo)

An object that stores information that’s used to generate printed output.

[`dictionary()`](/documentation/AppKit/NSPrintInfo/dictionary())

Returns the print info’s dictionary that contains the printing attributes.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)