<!--
{
  "documentType" : "article",
  "framework" : "CoreGraphics",
  "identifier" : "/documentation/CoreGraphics/cgpdfobject",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "CGPDFObject"
}
-->

# CGPDFObject

An object representing content within a PDF document.

## Discussion

PDF supports several basic types of object: Boolean values, integer and real numbers, strings, names, arrays, dictionaries, and streams. Most of these are represented in Core Graphics by corresponding specific types. A CGPDFObject can represent any of these types. You use CGPDFObject functions to determine the type of the object, and retrieve the object value if it is of an expected type.

This object is not derived from CFType and therefore there are no functions for retaining and releasing it. CGPDFObject objects exist as constituent parts of a CGPDFDocument object, and are managed by their container.

## Topics

### Getting Object Types and Values

[`CGPDFObjectGetType`](/documentation/CoreGraphics/CGPDFObjectGetType(_:))

Returns the PDF type identifier of an object.

[`CGPDFObjectGetValue`](/documentation/CoreGraphics/CGPDFObjectGetValue(_:_:_:))

Returns whether an object is of a given type and if it is, retrieves its value.

### Data Types

[`CGPDFObjectRef`](/documentation/CoreGraphics/CGPDFObjectRef)

A type that contains information about a PDF object.

[`CGPDFBoolean`](/documentation/CoreGraphics/CGPDFBoolean)

A PDF Boolean value.

[`CGPDFInteger`](/documentation/CoreGraphics/CGPDFInteger)

A PDF integer value.

[`CGPDFReal`](/documentation/CoreGraphics/CGPDFReal)

A PDF real value.

### Constants

[`CGPDFObjectType`](/documentation/CoreGraphics/CGPDFObjectType)

Types of PDF object.

## See Also

  [Quartz 2D Programming Guide](https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/Introduction/Introduction.html#//apple_ref/doc/uid/TP30001066)



---

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)