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

# NSPDFImageRep

An object that can render an image from a PDF format data stream.

```
class NSPDFImageRep
```

## Topics

### Creating Representations of Images from PDF Data

[`+  imageRepWithData:`](/documentation/AppKit/NSPDFImageRep/imageRepWithData:)

Creates and returns a representation of an image initialized with the specified PDF data.

[`-  initWithData:`](/documentation/AppKit/NSPDFImageRep/init(data:))

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

### Getting Data

[`bounds`](/documentation/AppKit/NSPDFImageRep/bounds)

The image representation’s bounding rectangle.

[`currentPage`](/documentation/AppKit/NSPDFImageRep/currentPage)

The page currently displayed by the image representation.

[`pageCount`](/documentation/AppKit/NSPDFImageRep/pageCount)

The number of pages in the image representation.

[`PDFRepresentation`](/documentation/AppKit/NSPDFImageRep/pdfRepresentation)

The PDF representation of the representation’s image.

## Relationships

### Conforms To

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`Hashable`](/documentation/Swift/Hashable)

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

[`Sendable`](/documentation/Swift/Sendable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

### Inherits From

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

---

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)