Foxit PDF SDK
FSPDFArray Class Reference
Inheritance diagram for FSPDFArray:
FSPDFObject

Instance Methods

(void) - addBoolean:
 Add a boolean value to the end of current PDF array object.
More...
 
(void) - addDateTime:
 Add a date time to the end of current PDF array object.
More...
 
(void) - addElement:
 Add a PDF object to the end of current PDF array object.
More...
 
(void) - addFloat:
 Add a float value to the end of current PDF array object.
More...
 
(void) - addInteger:
 Add an integer value to the end of current PDF array object.
More...
 
(void) - addMatrix:
 Add a matrix to the end of current PDF array object.
More...
 
(void) - addName:
 Add a string as PDF name object to the end of current PDF array object.
More...
 
(void) - addRect:
 Add a rectangle to the end of current PDF array object.
More...
 
(void) - addString:
 Add a string as PDF string object to the end of current PDF array object.
More...
 
(FSPDFObject *) - getElement:
 Get a specified element by index.
More...
 
(int) - getElementCount
 Get the count of elements.
More...
 
(void) - insertAt:element:
 Insert a PDF object to a specified position in current PDF array object.
More...
 
(void) - removeAt:
 Remove an element in a specified position (by index) from current PDF array object.
More...
 
(void) - setAt:element:
 Set a new PDF object at a specified position in current PDF array object.
More...
 
- Instance Methods inherited from FSPDFObject
(FSPDFObject *) - cloneObject
 Clone current PDF object and get the cloned PDF object.
More...
 
(FSPDFArray *) - getArray
 Get the PDF array object of current PDF object.
More...
 
(BOOL) - getBoolean
 Get the boolean value of current PDF object.
More...
 
(FSDateTime *) - getDateTime
 Get the date time value of current PDF object.
More...
 
(FSPDFDictionary *) - getDict
 Get the PDF dictionary object of current PDF object.
More...
 
(FSPDFObject *) - getDirectObject
 Get the direct object of current PDF object.
More...
 
(float) - getFloat
 Get the float value of current PDF object.
More...
 
(int) - getInteger
 Get the integer value of current PDF object.
More...
 
(FSMatrix2D *) - getMatrix
 Get the matrix value of current PDF object.
More...
 
(NSString *) - getName
 Get the name value of current PDF object.
More...
 
(unsigned int) - getObjNum
 Get the indirect object number of current PDF object.
More...
 
(FSRectF *) - getRect
 Get the rectangle value of current PDF object.
More...
 
(FSPDFStream *) - getStream
 Get the PDF stream object of current PDF object.
More...
 
(NSString *) - getString
 Get the string value of current PDF object.
More...
 
(FSPDFObjectType- getType
 Get the type of current PDF object.
More...
 
(NSString *) - getWideString
 Get the wide string value of current PDF object.
More...
 

Class Methods

(FSPDFArray *) + create
 Create a new array object.
More...
 
(FSPDFArray *) + createFromMatrix:
 Create a new array object for a matrix.
More...
 
(FSPDFArray *) + createFromRect:
 Create a new array object for a rectangle.
More...
 
- Class Methods inherited from FSPDFObject
(FSPDFObject *) + createFromBoolean:
 Create a PDF object from a boolean value.
More...
 
(FSPDFObject *) + createFromDateTime:
 Create a PDF object from date time.
More...
 
(FSPDFObject *) + createFromFloat:
 Create a PDF object from a float number.
More...
 
(FSPDFObject *) + createFromInteger:
 Create a PDF object from a integer number.
More...
 
(FSPDFObject *) + createFromName:
 Create a PDF object from a string which represents a name.
More...
 
(FSPDFObject *) + createFromString:
 Create a PDF object from string.
More...
 
(FSPDFObject *) + createReference:object_number:
 Create a reference for an indirect object.
More...
 

Detailed Description

A PDF array object is a one-dimensional collection of objects arranged sequentially. Unlike arrays in many other computer languages, elements in a PDF array can be any combination of numbers, strings, dictionaries, or any other objects, including other arrays. For more details, please refer to Section 3.2.5 "Array Objects" in <PDF Reference 1.7>.
Class FSPDFArray is derived from FSPDFObject and offers functions to create a new PDF array object and get/set elements of a PDF array object.

See also
FSPDFObject

Method Documentation

◆ addBoolean:()

- (void) addBoolean: (BOOL)  boolean_value

Add a boolean value to the end of current PDF array object.

Parameters
[in]boolean_valueA boolean value to current PDF array object.
Returns
None.

◆ addDateTime:()

- (void) addDateTime: (FSDateTime*)  date_time

Add a date time to the end of current PDF array object.

Parameters
[in]date_timeA date time to current PDF array object.
Returns
None.

◆ addElement:()

- (void) addElement: (FSPDFObject*)  element

Add a PDF object to the end of current PDF array object.

Parameters
[in]elementA PDF object to be added to current PDF array object. It should not be nil.
Returns
None.

◆ addFloat:()

- (void) addFloat: (float)  float_value

Add a float value to the end of current PDF array object.

Parameters
[in]float_valueA float value to current PDF array object.
Returns
None.

◆ addInteger:()

- (void) addInteger: (int)  integer_value

Add an integer value to the end of current PDF array object.

Parameters
[in]integer_valueAn integer value to current PDF array object.
Returns
None.

◆ addMatrix:()

- (void) addMatrix: (FSMatrix2D*)  matrix

Add a matrix to the end of current PDF array object.

Parameters
[in]matrixA matrix to current PDF array object.
Returns
None.

◆ addName:()

- (void) addName: (NSString *)  name

Add a string as PDF name object to the end of current PDF array object.

Parameters
[in]nameA string to be added as PDF name object to current PDF array object. It should not be an empty string.
Returns
None.

◆ addRect:()

- (void) addRect: (FSRectF*)  rect

Add a rectangle to the end of current PDF array object.

Parameters
[in]rectA rectangle to current PDF array object.
Returns
None.

◆ addString:()

- (void) addString: (NSString *)  new_string

Add a string as PDF string object to the end of current PDF array object.

Parameters
[in]new_stringA string to be added as PDF string object to current PDF array object. It should not be an empty string.
Returns
None.

◆ create()

+ (FSPDFArray *) create

Create a new array object.

Returns
A new FSPDFArray object.

◆ createFromMatrix:()

+ (FSPDFArray *) createFromMatrix: (FSMatrix2D*)  matrix

Create a new array object for a matrix.

Parameters
[in]matrixA matrix.
Returns
A new FSPDFArray object.

◆ createFromRect:()

+ (FSPDFArray *) createFromRect: (FSRectF*)  rect

Create a new array object for a rectangle.

Parameters
[in]rectA rectangle.
Returns
A new FSPDFArray object.

◆ getElement:()

- (FSPDFObject *) getElement: (int)  index

Get a specified element by index.

Parameters
[in]indexIndex of the element to be retrieved. Valid range: from 0 to (count-1). count is returned by function FSPDFArray::getElementCount.
Returns
A FSPDFObject object that receives the specified element.

◆ getElementCount()

- (int) getElementCount

Get the count of elements.

Returns
Element count

◆ insertAt:element:()

- (void) insertAt: (int)  index
element: (FSPDFObject*)  element 

Insert a PDF object to a specified position in current PDF array object.

Parameters
[in]indexIndex of the position where parameter element will be inserted to. Valid range: from 0 to (count-1). count is returned by function FSPDFArray::getElementCount.
If this is below 0 or count of elements in current PDF array is 0, parameter element is to be inserted to the first position.
If this is larger than count of element in current PDF array, parameter element is to be added to the end.
[in]elementA PDF object to be inserted to current PDF array object. It should not be nil.
Returns
None.

◆ removeAt:()

- (void) removeAt: (int)  index

Remove an element in a specified position (by index) from current PDF array object.

Parameters
[in]indexIndex of the position where the element will be removed. Valid range: from 0 to (count-1). count is returned by function FSPDFArray::getElementCount.
Returns
None.

◆ setAt:element:()

- (void) setAt: (int)  index
element: (FSPDFObject*)  element 

Set a new PDF object at a specified position in current PDF array object.

Parameters
[in]indexIndex of the position where parameter element will be set to. Valid range: from 0 to (count-1). count is returned by function FSPDFArray::getElementCount.
[in]elementA PDF object to be set to current PDF array object. It should not be nil.
Returns
None.