---
title: "CGPDFContentStreamGetResource(_:_:_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgpdfcontentstreamgetresource(_:_:_:)"
---

# CGPDFContentStreamGetResource(_:_:_:)

Gets the specified resource from a PDF content stream object.

## Declaration

```swift
func CGPDFContentStreamGetResource(_ cs: CGPDFContentStreamRef, _ category: UnsafePointer<CChar>, _ name: UnsafePointer<CChar>) -> CGPDFObjectRef?
```

## Parameters

- `cs`: A PDF content stream object.
- `category`: A string that specifies the category of the resource you want to obtain.
- `name`: A string that specifies the name of the resource you want to obtain.

## Return Value

Return Value The resource dictionary.

## Discussion

Discussion You can use this function to obtain resources used by the content stream, such as forms, patterns, color spaces, and fonts.

## See Also

### Getting Data from a PDF Content Stream Object

- [CGPDFContentStreamGetStreams(_:)](coregraphics/cgpdfcontentstreamgetstreams(_:).md)
