---
title: "CGPDFDictionaryGetString(_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgpdfdictionarygetstring(_:_:_:)"
---

# CGPDFDictionaryGetString(_:_:_:)

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

## Declaration

```swift
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

Return Value Returns true if there is a PDF string associated with the specified key; otherwise, false.

## See Also

### Getting Data from a Dictionary

- [CGPDFDictionaryGetArray(_:_:_:)](coregraphics/cgpdfdictionarygetarray(_:_:_:).md)
- [CGPDFDictionaryGetBoolean(_:_:_:)](coregraphics/cgpdfdictionarygetboolean(_:_:_:).md)
- [CGPDFDictionaryGetCount(_:)](coregraphics/cgpdfdictionarygetcount(_:).md)
- [CGPDFDictionaryGetDictionary(_:_:_:)](coregraphics/cgpdfdictionarygetdictionary(_:_:_:).md)
- [CGPDFDictionaryGetInteger(_:_:_:)](coregraphics/cgpdfdictionarygetinteger(_:_:_:).md)
- [CGPDFDictionaryGetName(_:_:_:)](coregraphics/cgpdfdictionarygetname(_:_:_:).md)
- [CGPDFDictionaryGetNumber(_:_:_:)](coregraphics/cgpdfdictionarygetnumber(_:_:_:).md)
- [CGPDFDictionaryGetObject(_:_:_:)](coregraphics/cgpdfdictionarygetobject(_:_:_:).md)
- [CGPDFDictionaryGetStream(_:_:_:)](coregraphics/cgpdfdictionarygetstream(_:_:_:).md)
