---
title: "init(data:)"
framework: appkit
role: symbol
role_heading: Initializer
path: "appkit/nspdfimagerep/init(data:)"
---

# init(data:)

Returns a representation of an image initialized with the specified PDF data.

## Declaration

```swift
init?(data pdfData: Data)
```

## Parameters

- `pdfData`: A data object containing the PDF data for the image.

## Return Value

Return Value An initialized NSPDFImageRep object, or nil if the object could not be initialized. Initialization may fail if the PDF data does not conform to the PDF file format.

## See Also

### Related Documentation

- [pdfRepresentation](appkit/nspdfimagerep/pdfrepresentation.md)
