CGPDFArray

An array structure within a PDF document.

Overview

PDF arrays may be heterogeneous—that is, they may contain any other PDF objects, including PDF strings, PDF dictionaries, and other PDF arrays.

Many CGPDFArray functions to retrieve values from a PDF array take the form:

bool CGPDFArrayGet<DataType> (
 CGPDFArrayRef array,
 size_t index,
 <DataType>Ref *value
);

These functions test the data type of the object at the specified index. If the object is not of the expected type, the function returns NO. If the object is of the expected type, the function returns YES, and the object is passed back in the value parameter.

This type is not derived from CFTypeRef and therefore there are no functions for retaining and releasing it. CGPDFArrayRef objects exist only as constituent parts of a CGPDFDocumentRef object, and they are managed by their container.

Topics

Getting Data from a PDF Array

CGPDFArrayGetArray

Returns whether an object at a given index in a PDF array is another PDF array and, if so, retrieves that array.

CGPDFArrayGetBoolean

Returns whether an object at a given index in a PDF array is a PDF Boolean and, if so, retrieves that Boolean.

CGPDFArrayGetCount

Returns the number of items in a PDF array.

CGPDFArrayGetDictionary

Returns whether an object at a given index in a PDF array is a PDF dictionary and, if so, retrieves that dictionary.

CGPDFArrayGetInteger

Returns whether an object at a given index in a PDF array is a PDF integer and, if so, retrieves that object.

CGPDFArrayGetName

Returns whether an object at a given index in a PDF array is a PDF name reference (represented as a constant C string) and, if so, retrieves that name.

CGPDFArrayGetNull

Returns whether an object at a given index in a Quartz PDF array is a PDF null.

CGPDFArrayGetNumber

Returns whether an object at a given index in a PDF array is a PDF number and, if so, retrieves that object.

CGPDFArrayGetObject

Returns whether an object at a given index in a PDF array is a PDF object and, if so, retrieves that object.

CGPDFArrayGetStream

Returns whether an object at a given index in a PDF array is a PDF stream and, if so, retrieves that stream.

CGPDFArrayGetString

Returns whether an object at a given index in a PDF array is a PDF string and, if so, retrieves that string.

Data Types

CGPDFArrayRef

An opaque type that encapsulates a PDF array.

See Also

Opaque Types

CGBitmapContext

A type of CGContextRef that you can use for drawing bits to memory.

CGColor

A set of components that define a color, with a color space specifying how to interpret them.

CGColorConversionInfo

An object that describes how to convert between color spaces for use by other system services.

CGColorSpace

A profile that specifies how to interpret a color value for display.

CGContext

A Quartz 2D drawing destination.

CGDataConsumer

An abstraction for data-writing tasks that eliminates the need to manage a raw memory buffer.

CGDataProvider

An abstraction for data-reading tasks that eliminates the need to manage a raw memory buffer.

CGFont

A set of character glyphs and layout information for drawing text.

CGFunction

A general facility for defining and using callback functions.

CGGLContext

Deprecated. A type of CGContextRef for drawing OpenGL content.

CGGradient

A definition for a smooth transition between colors for drawing radial and axial gradient fills.

CGImage

A bitmap image or image mask.

CGLayer

An offscreen context for reusing content drawn with Core Graphics.

CGPath

Immutable and mutable types for graphics paths: mathematical descriptions of shapes or lines to be drawn in a graphics context.

CGPattern

A 2D pattern to be used for drawing graphics paths.

CGPDFContentStream

A representation of one or more content data streams in a PDF page.

CGPDFContext

A type of CGContextRef for drawing PDF content.

CGPDFDictionary

A dictionary structure within a PDF document.

CGPDFDocument

A document that contains PDF (Portable Document Format) drawing information.

CGPDFObject

An object representing content within a PDF document.

CGPDFOperatorTable

A set of callback functions for operators used when scanning content in a PDF document.

CGPDFPage

A page in a PDF document.

CGPDFScanner

A parser object for handling content and operators in a PDF content stream.

CGPDFStream

A stream or sequence of data bytes in a PDF document.

CGPDFString

A text string in a PDF document.

CGPSConverter

An object that converts PostScript data to PDF data.

CGShading

A definition for a smooth transition between colors, controlled by a custom function you provide, for drawing radial and axial gradient fills.