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

# init(name:)

Creates and returns a printer object initialized with the specified printer name.

## Declaration

```swift
init?(name: String)
```

## Parameters

- `name`: The name of the printer.

## Return Value

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

## See Also

### Related Documentation

- [name](appkit/nsprinter/name.md)
- [NSPrinter](appkit/nsprinter.md)
- [printerNames](appkit/nsprinter/printernames.md)

### Creating the Printer Object

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