---
title: "CGPDFContentStreamCreateWithPage(_:)"
framework: coregraphics
role: symbol
role_heading: Function
path: "coregraphics/cgpdfcontentstreamcreatewithpage(_:)"
---

# CGPDFContentStreamCreateWithPage(_:)

Creates a content stream object from a PDF page object.

## Declaration

```swift
func CGPDFContentStreamCreateWithPage(_ page: CGPDFPage) -> CGPDFContentStreamRef
```

## Parameters

- `page`: A PDF page object.

## Return Value

Return Value A new CGPDFContentStreamRef object. In Objective-C, you’re responsible for releasing this object by calling the CGPDFContentStreamRelease(_:) function.

## Discussion

Discussion A CGPDFContentStreamRef object can contain more than one PDF content stream. To retrieve an array of the PDF content streams in the object, call the function CGPDFContentStreamGetStreams(_:). To obtain the resources associated with a CGPDFContentStreamRef object, call the function CGPDFContentStreamGetResource(_:_:_:).

## See Also

### Creating a PDF Content Stream Object

- [CGPDFContentStreamCreateWithStream(_:_:_:)](coregraphics/cgpdfcontentstreamcreatewithstream(_:_:_:).md)
