---
title: "init(type:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nsprinter/init(type:)"
---

# init(type:)

Creates and returns a printer object initialized to the first available printer with the specified make and model information.

## Declaration

```swift
init?(type: NSPrinter.TypeName)
```

## Parameters

- `type`: A string describing the make and model information. You can get this string using the doc://com.apple.appkit/documentation/AppKit/NSPrinter/printerTypes method.

## Return Value

Return Value An initialized NSPrinter object, or nil if the specified printer was not available.

## See Also

### Related Documentation

- [type](appkit/nsprinter/type.md)

### Creating the Printer Object

- [init(name:)](appkit/nsprinter/init(name:).md)
