Foxit PDF RDK

Public Member Functions | Static Public Member Functions | List of all members
PDFArray Class Reference
Inheritance diagram for PDFArray:

## 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...
Public Member Functions inherited from PDFObject
| CloneObject ()
| Clone current PDF object and get the cloned PDF object. More...
| DeepCloneObject ()
| Clone current PDF object and get the cloned PDF object. More...
| GetArray ()
| Get the PDF array object of current PDF object. More...
| GetBoolean ()
| Get the boolean value of current PDF object. More...
| GetDateTime ()
| Get the date time value of current PDF object. More...
| GetDict ()
| Get the PDF dictionary object of current PDF object. More...
| GetDirectObject ()
| Get the direct object of current PDF object. More...
| GetFloat ()
| Get the float value of current PDF object. More...
| GetInteger ()
| Get the integer value of current PDF object. More...
| GetMatrix ()
| Get the matrix value of current PDF object. More...
| GetName ()
| Get the name value of current PDF object. More...
| GetObjNum ()
| Get the indirect object number of current PDF object. More...
| GetRect ()
| Get the rectangle value of current PDF object. More...
| GetStream ()
| Get the PDF stream object of current PDF object. More...
| GetString ()
| Get the string value of current PDF object. More...
| GetType ()
| Get the type of current PDF object. More...
| GetWideString ()
| Get the wide string value of current PDF object. More...
| IsIdentical (pdf_obj)
| Check if input PDF object is identical with current PDF object. More...
| Release ()
| Release a newly created PDF object or a clone PDF object, which is not related to PDF document or other PDF object and will not be used any more. 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...
Static Public Member Functions inherited from PDFObject
static | CreateFromBoolean (boolean_value)
| Create a PDF object from a boolean value. More...
static | CreateFromDateTime (date_time)
| Create a PDF object from date time. More...
static | CreateFromFloat (float_value)
| Create a PDF object from a float number. More...
static | CreateFromInteger (integer_value)
| Create a PDF object from a integer number. More...
static | CreateFromName (name)
| Create a PDF object from a string which represents a name. More...
static | CreateFromString (string_value)
| Create a PDF object from string. More...
static | CreateReference (document, object_number)
| Create a reference for an indirect object. More...

## Additional Inherited Members
Static Public Attributes inherited from PDFObject
static | e_Array
| PDF array object.
static | e_Boolean
| PDF boolean object.
static | e_Dictionary
| PDF dictionary object.
static | e_InvalidType
| Enumeration for PDF object type. More...
static | e_Name
| PDF name object.
static | e_Null
| PDF null object.
static | e_Number
| PDF number object.
static | e_Reference
| PDF reference object.
static | e_Stream
| PDF stream object.
static | e_String
| PDF string object.

## 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 PDFArray is derived from PDFObject and offers functions to create a new PDF array object and get/set elements of a PDF array object.

See also
  PDFObject

## Member Function Documentation

## ◆ AddBoolean()

PDFArray.AddBoolean | ( | boolean_value |  | ) |

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

Parameters

  [in] | boolean_value | A boolean value to current PDF array object.

Returns
  None.

## ◆ AddDateTime()

PDFArray.AddDateTime | ( | date_time |  | ) |

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

Parameters

  [in] | date_time | A date time to current PDF array object.

Returns
  None.

## ◆ AddElement()

PDFArray.AddElement | ( | element |  | ) |

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

Parameters

  [in] | element | A PDF object to be added to current PDF array object. It should not be null.

Returns
  None.

## ◆ AddFloat()

PDFArray.AddFloat | ( | float_value |  | ) |

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

Parameters

  [in] | float_value | A float value to current PDF array object.

Returns
  None.

## ◆ AddInteger()

PDFArray.AddInteger | ( | integer_value |  | ) |

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

Parameters

  [in] | integer_value | An integer value to current PDF array object.

Returns
  None.

## ◆ AddMatrix()

PDFArray.AddMatrix | ( | matrix |  | ) |

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

Parameters

  [in] | matrix | A matrix to current PDF array object.

Returns
  None.

## ◆ AddName()

PDFArray.AddName | ( | name |  | ) |

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

Parameters

  [in] | name | A string to be added as PDF name object to current PDF array object. It should not be an empty string.

Returns
  None.

## ◆ AddRect()

PDFArray.AddRect | ( | rect |  | ) |

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

Parameters

  [in] | rect | A rectangle to current PDF array object.

Returns
  None.

## ◆ AddString()

PDFArray.AddString | ( | new_string |  | ) |

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

Parameters

  [in] | new_string | A string to be added as PDF string object to current PDF array object. It should not be an empty string.

Returns
  None.

## ◆ Create()

static PDFArray.Create | ( |  | ) |
| static

Create a new array object.

Please call function 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 PDFArray object. If there is any error, this function will return null.

## ◆ CreateFromMatrix()

static PDFArray.CreateFromMatrix | ( | matrix |  | ) |
| static

Create a new array object for a matrix.

Please call function 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] | matrix | A matrix.

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

## ◆ CreateFromRect()

static PDFArray.CreateFromRect | ( | rect |  | ) |
| static

Create a new array object for a rectangle.

Please call function 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] | rect | A rectangle.

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

## ◆ GetElement()

PDFArray.GetElement | ( | index |  | ) |

Get a specified element by index.

Parameters

  [in] | index | Index of the element to be retrieved. Valid range: from 0 to (count-1). count is returned by function PDFArray.GetElementCount.

Returns
  A PDFObject object that receives the specified element. If there is any error, this function will return null.

## ◆ GetElementCount()

PDFArray.GetElementCount | ( |  | ) |

Get the count of elements.

Returns
  Element count.

## ◆ InsertAt()

PDFArray.InsertAt | ( | index | ,
|  | element |
| ) |  |

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

Parameters

  [in] | index | Index of the position where parameter element will be inserted to. Valid range: from 0 to (count-1). count is returned by function 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] | element | A PDF object to be inserted to current PDF array object. It should not be null.

Returns
  None.

## ◆ RemoveAt()

PDFArray.RemoveAt | ( | index |  | ) |

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

Parameters

  [in] | index | Index of the position where the element will be removed. Valid range: from 0 to (count-1). count is returned by function PDFArray.GetElementCount.

Returns
  None.

## ◆ SetAt()

PDFArray.SetAt | ( | index | ,
|  | element |
| ) |  |

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

Parameters

  [in] | index | Index of the position where parameter element will be set to. Valid range: from 0 to (count-1). count is returned by function PDFArray.GetElementCount.
  [in] | element | A PDF object to be set to current PDF array object. It should not be null.

Returns
  None.