---
title: "CGPDFStringGetBytePtr(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgpdfstringgetbyteptr(_:)"
---

# CGPDFStringGetBytePtr(_:)

Returns a pointer to the bytes of a PDF string.

## Declaration

```swift
func CGPDFStringGetBytePtr(_ string: CGPDFStringRef) -> UnsafePointer<UInt8>?
```

## Parameters

- `string`: A PDF string.

## Return Value

Return Value Returns a pointer to the bytes of the specified string. If the string is NULL, the function returns NULL.

## See Also

### Getting PDF String Data

- [CGPDFStringGetLength(_:)](coregraphics/cgpdfstringgetlength(_:).md)
