<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSGraphicsContext/RepresentationFormatName",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:@T@NSGraphicsContextRepresentationFormatName"
  },
  "title" : "NSGraphicsContext.RepresentationFormatName"
}
-->

# NSGraphicsContext.RepresentationFormatName

Constants that specify values for the representation format name key in a graphic context’s attributes dictionary.

```
struct RepresentationFormatName
```

## Discussion

You use these constants with the [`representationFormat`](/documentation/AppKit/NSGraphicsContext/AttributeKey/representationFormat) key.

## Topics

### Format Names

[`static let pdf: NSGraphicsContext.RepresentationFormatName`](/documentation/AppKit/NSGraphicsContext/RepresentationFormatName/pdf)

Destination file format is PDF.

[`static let postScript: NSGraphicsContext.RepresentationFormatName`](/documentation/AppKit/NSGraphicsContext/RepresentationFormatName/postScript)

Destination file format is PostScript.

### Initializers

[`init(rawValue: String)`](/documentation/AppKit/NSGraphicsContext/RepresentationFormatName/init(rawValue:))

Creates a new instance with the specified raw value.

## Relationships

### Conforms To

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

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

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

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

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

---

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)