Function

CGPDFArrayGetObject

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

Declaration

bool CGPDFArrayGetObject(CGPDFArrayRef array, size_t index, CGPDFObjectRef  _Nullable *value);

Parameters

array

A PDF array. If this parameter is not a valid PDF array, the behavior is undefined.

index

The index of the value to retrieve. If the index is outside the index space of the array (0 to N-1, where N is the count of the array), the behavior is undefined.

value

On input, a pointer to a PDF object. If the value at the specified index is a PDF object, then on return contains that object, otherwise the value is undefined.

Return Value

Returns YES if there is a PDF object at the specified index, otherwise NO.

See Also

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.

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.