<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.3.0 -",
    "tvOS: -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/CGPDFDictionaryGetString(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Graphics"
    ],
    "preciseIdentifier" : "c:@F@CGPDFDictionaryGetString"
  },
  "title" : "CGPDFDictionaryGetString(_:_:_:)"
}
-->

# CGPDFDictionaryGetString(_:_:_:)

Returns whether there is a PDF string associated with a specified key in a PDF dictionary and, if so, retrieves that string.

```
func CGPDFDictionaryGetString(_ dict: CGPDFDictionaryRef, _ key: UnsafePointer<CChar>, _ value: UnsafeMutablePointer<CGPDFStringRef?>?) -> Bool
```

## Parameters

`dict`

A PDF dictionary. If this parameter is not a valid PDF dictionary, the behavior is undefined.

`key`

The key for the value to retrieve.

`value`

On input, a pointer to a PDF string. If the value associated with the specified key is a PDF string, then on return contains that string; otherwise the value is unspecified.

## Return Value

Returns <doc://com.apple.documentation/documentation/Swift/true> if there is a PDF string associated with the specified key; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

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)