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

# CGPDFContentStreamCreateWithPage(_:)

Creates a content stream object from a PDF page object.

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

## Parameters

`page`

A PDF page object.

## Return Value

A new [`CGPDFContentStreamRef`](/documentation/CoreGraphics/CGPDFContentStreamRef) object. In Objective-C, you’re responsible for releasing this object by calling the [`CGPDFContentStreamRelease(_:)`](/documentation/CoreGraphics/CGPDFContentStreamRelease(_:)) function.

## Discussion

A [`CGPDFContentStreamRef`](/documentation/CoreGraphics/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(_:)`](/documentation/CoreGraphics/CGPDFContentStreamGetStreams(_:)). To obtain the resources associated with a [`CGPDFContentStreamRef`](/documentation/CoreGraphics/CGPDFContentStreamRef) object, call the function [`CGPDFContentStreamGetResource(_:_:_:)`](/documentation/CoreGraphics/CGPDFContentStreamGetResource(_:_:_:)).

---

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)