Foxit PDF SDK
FSDK.PDFArray Class Reference

Public Member Functions

 AddBoolean (boolean_value)
 Add a boolean value to the end of current PDF array object. More...
 
 AddDateTime (date_time)
 Add a date time to the end of current PDF array object. More...
 
 AddElement (element)
 Add a PDF object to the end of current PDF array object. More...
 
 AddFloat (float_value)
 Add a float value to the end of current PDF array object. More...
 
 AddInteger (integer_value)
 Add an integer value to the end of current PDF array object. More...
 
 AddMatrix (matrix)
 Add a matrix to the end of current PDF array object. More...
 
 AddName (name)
 Add a string as PDF name object to the end of current PDF array object. More...
 
 AddRect (rect)
 Add a rectangle to the end of current PDF array object. More...
 
 AddString (new_string)
 Add a string as PDF string object to the end of current PDF array object. More...
 
 GetElement (index)
 Get a specified element by index. More...
 
 GetElementCount ()
 Get the count of elements. More...
 
 InsertAt (index, element)
 Insert a PDF object to a specified position in current PDF array object. More...
 
 RemoveAt (index)
 Remove an element in a specified position (by index) from current PDF array object. More...
 
 SetAt (index, element)
 Set a new PDF object at a specified position in current PDF array object. More...
 

Static Public Member Functions

static Create ()
 Create a new array object. More...
 
static CreateFromMatrix (matrix)
 Create a new array object for a matrix. More...
 
static CreateFromRect (rect)
 Create a new array object for a rectangle. 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 FSDK.PDFArray is derived from FSDK.PDFObject and offers functions to create a new PDF array object and get/set elements of a PDF array object.

See also
FSDK.PDFObject

Member Function Documentation

◆ AddBoolean()

FSDK.PDFArray.AddBoolean ( 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()

FSDK.PDFArray.AddDateTime ( 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()

FSDK.PDFArray.AddElement ( 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 null.
Returns
None.

◆ AddFloat()

FSDK.PDFArray.AddFloat ( 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()

FSDK.PDFArray.AddInteger ( 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()

FSDK.PDFArray.AddMatrix ( matrix  )

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

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

◆ AddName()

FSDK.PDFArray.AddName ( 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()

FSDK.PDFArray.AddRect ( rect  )

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

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

◆ AddString()

FSDK.PDFArray.AddString ( 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()

static FSDK.PDFArray.Create ( )
static

Create a new array object.

Please call function FSDK.PDFObject.Release to release the created object if it has not been added/set into PDF document or other PDF object and will not be used any more.

Returns
A new FSDK.PDFArray object. If there is any error, this function will return null.

◆ CreateFromMatrix()

static FSDK.PDFArray.CreateFromMatrix ( matrix  )
static

Create a new array object for a matrix.

Please call function FSDK.PDFObject.Release to release the created object if it has not been added/set into PDF document or other PDF object and will not be used any more.

Parameters
[in]matrixA matrix.
Returns
A new FSDK.PDFArray object. If there is any error, this function will return null.

◆ CreateFromRect()

static FSDK.PDFArray.CreateFromRect ( rect  )
static

Create a new array object for a rectangle.

Please call function FSDK.PDFObject.Release to release the created object if it has not been added/set into PDF document or other PDF object and will not be used any more.

Parameters
[in]rectA rectangle.
Returns
A new FSDK.PDFArray object. If there is any error, this function will return null.

◆ GetElement()

FSDK.PDFArray.GetElement ( 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 FSDK.PDFArray.GetElementCount.
Returns
A FSDK.PDFObject object that receives the specified element. If there is any error, this function will return null.

◆ GetElementCount()

FSDK.PDFArray.GetElementCount ( )

Get the count of elements.

Returns
Element count.

◆ InsertAt()

FSDK.PDFArray.InsertAt ( index  ,
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 FSDK.PDFArray.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 null.
Returns
None.

◆ RemoveAt()

FSDK.PDFArray.RemoveAt ( 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 FSDK.PDFArray.GetElementCount.
Returns
None.

◆ SetAt()

FSDK.PDFArray.SetAt ( index  ,
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 FSDK.PDFArray.GetElementCount.
[in]elementA PDF object to be set to current PDF array object. It should not be null.
Returns
None.