Foxit PDF SDK
|
Public Member Functions | |
void | addBoolean (boolean boolean_value) throws com.foxit.sdk.PDFException |
Add a boolean value to the end of current PDF array object. More... | |
void | addDateTime (DateTime date_time) throws com.foxit.sdk.PDFException |
Add a date time to the end of current PDF array object. More... | |
void | addElement (PDFObject element) throws com.foxit.sdk.PDFException |
Add a PDF object to the end of current PDF array object. More... | |
void | addFloat (float float_value) throws com.foxit.sdk.PDFException |
Add a float value to the end of current PDF array object. More... | |
void | addInteger (int integer_value) throws com.foxit.sdk.PDFException |
Add an integer value to the end of current PDF array object. More... | |
void | addMatrix (Matrix2D matrix) throws com.foxit.sdk.PDFException |
Add a matrix to the end of current PDF array object. More... | |
void | addName (String name) throws com.foxit.sdk.PDFException |
Add a string as PDF name object to the end of current PDF array object. More... | |
void | addRect (RectF rect) throws com.foxit.sdk.PDFException |
Add a rectangle to the end of current PDF array object. More... | |
void | addString (String new_string) throws com.foxit.sdk.PDFException |
Add a string as PDF string object to the end of current PDF array object. More... | |
PDFObject | getElement (int index) throws com.foxit.sdk.PDFException |
Get a specified element by index. More... | |
int | getElementCount () throws com.foxit.sdk.PDFException |
Get the count of elements. More... | |
void | insertAt (int index, PDFObject element) throws com.foxit.sdk.PDFException |
Insert a PDF object to a specified position in current PDF array object. More... | |
void | removeAt (int index) throws com.foxit.sdk.PDFException |
Remove an element in a specified position (by index) from current PDF array object. More... | |
void | setAt (int index, PDFObject element) throws com.foxit.sdk.PDFException |
Set a new PDF object at a specified position in current PDF array object. More... | |
![]() | |
PDFObject | cloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
PDFArray | getArray () |
Get the PDF array object of current PDF object. More... | |
boolean | getBoolean () throws com.foxit.sdk.PDFException |
Get the boolean value of current PDF object. More... | |
DateTime | getDateTime () throws com.foxit.sdk.PDFException |
Get the date time value of current PDF object. More... | |
PDFDictionary | getDict () |
Get the PDF dictionary object of current PDF object. More... | |
PDFObject | getDirectObject () |
Get the direct object of current PDF object. More... | |
float | getFloat () throws com.foxit.sdk.PDFException |
Get the float value of current PDF object. More... | |
int | getInteger () throws com.foxit.sdk.PDFException |
Get the integer value of current PDF object. More... | |
Matrix2D | getMatrix () throws com.foxit.sdk.PDFException |
Get the matrix value of current PDF object. More... | |
String | getName () throws com.foxit.sdk.PDFException |
Get the name value of current PDF object. More... | |
int | getObjNum () |
Get the indirect object number of current PDF object. More... | |
RectF | getRect () throws com.foxit.sdk.PDFException |
Get the rectangle value of current PDF object. More... | |
PDFStream | getStream () |
Get the PDF stream object of current PDF object. More... | |
byte [] | getString () |
Get the string value of current PDF object. More... | |
int | getType () |
Get the type of current PDF object. More... | |
String | getWideString () |
Get the wide string value of current PDF object. More... | |
void | 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 PDFArray | create () throws com.foxit.sdk.PDFException |
Create a new array object. More... | |
static PDFArray | createFromMatrix (Matrix2D matrix) throws com.foxit.sdk.PDFException |
Create a new array object for a matrix. More... | |
static PDFArray | createFromRect (RectF rect) throws com.foxit.sdk.PDFException |
Create a new array object for a rectangle. More... | |
![]() | |
static PDFObject | createFromBoolean (boolean boolean_value) |
Create a PDF object from a boolean value. More... | |
static PDFObject | createFromDateTime (DateTime date_time) |
Create a PDF object from date time. More... | |
static PDFObject | createFromFloat (float float_value) |
Create a PDF object from a float number. More... | |
static PDFObject | createFromInteger (int integer_value) |
Create a PDF object from a integer number. More... | |
static PDFObject | createFromName (String name) |
Create a PDF object from a string which represents a name. More... | |
static PDFObject | createFromString (String string_value) |
Create a PDF object from string. More... | |
static PDFObject | createReference (PDFDoc document, int object_number) |
Create a reference for an indirect object. More... | |
Additional Inherited Members | |
![]() | |
static final int | e_Array = 5 |
PDF array object. | |
static final int | e_Boolean = 1 |
PDF boolean object. | |
static final int | e_Dictionary = 6 |
PDF dictionary object. | |
static final int | e_InvalidType = 0 |
Invalid PDF object type. | |
static final int | e_Name = 4 |
PDF name object. | |
static final int | e_Null = 8 |
PDF null object. | |
static final int | e_Number = 2 |
PDF number object. | |
static final int | e_Reference = 9 |
PDF reference object. | |
static final int | e_Stream = 7 |
PDF stream object. | |
static final int | e_String = 3 |
PDF string object. | |
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 com.foxit.sdk.pdf.objects.PDFArray is derived from PDFObject and offers functions to create a new PDF array object and get/set elements of a PDF array object.
void com.foxit.sdk.pdf.objects.PDFArray.addBoolean | ( | boolean | boolean_value | ) | throws com.foxit.sdk.PDFException |
Add a boolean value to the end of current PDF array object.
[in] | boolean_value | A boolean value to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addDateTime | ( | DateTime | date_time | ) | throws com.foxit.sdk.PDFException |
Add a date time to the end of current PDF array object.
[in] | date_time | A date time to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addElement | ( | PDFObject | element | ) | throws com.foxit.sdk.PDFException |
Add a PDF object to the end of current PDF array object.
[in] | element | A PDF object to be added to current PDF array object. It should not be null. |
void com.foxit.sdk.pdf.objects.PDFArray.addFloat | ( | float | float_value | ) | throws com.foxit.sdk.PDFException |
Add a float value to the end of current PDF array object.
[in] | float_value | A float value to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addInteger | ( | int | integer_value | ) | throws com.foxit.sdk.PDFException |
Add an integer value to the end of current PDF array object.
[in] | integer_value | An integer value to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addMatrix | ( | Matrix2D | matrix | ) | throws com.foxit.sdk.PDFException |
Add a matrix to the end of current PDF array object.
[in] | matrix | A matrix to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addName | ( | String | name | ) | throws com.foxit.sdk.PDFException |
Add a string as PDF name object to the end of current PDF array object.
[in] | name | A string to be added as PDF name object to current PDF array object. It should not be an empty string. |
void com.foxit.sdk.pdf.objects.PDFArray.addRect | ( | RectF | rect | ) | throws com.foxit.sdk.PDFException |
Add a rectangle to the end of current PDF array object.
[in] | rect | A rectangle to current PDF array object. |
void com.foxit.sdk.pdf.objects.PDFArray.addString | ( | String | new_string | ) | throws com.foxit.sdk.PDFException |
Add a string as PDF string object to the end of current PDF array object.
[in] | new_string | A string to be added as PDF string object to current PDF array object. It should not be an empty string. |
|
static |
Create a new array object.
|
static |
Create a new array object for a matrix.
[in] | matrix | A matrix. |
|
static |
Create a new array object for a rectangle.
[in] | rect | A rectangle. |
PDFObject com.foxit.sdk.pdf.objects.PDFArray.getElement | ( | int | index | ) | throws com.foxit.sdk.PDFException |
Get a specified element by index.
[in] | index | Index of the element to be retrieved. Valid range: from 0 to (count-1). count is returned by function PDFArray.getElementCount . |
int com.foxit.sdk.pdf.objects.PDFArray.getElementCount | ( | ) | throws com.foxit.sdk.PDFException |
Get the count of elements.
void com.foxit.sdk.pdf.objects.PDFArray.insertAt | ( | int | index, |
PDFObject | element | ||
) | throws com.foxit.sdk.PDFException |
Insert a PDF object to a specified position in current PDF array object.
[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. |
void com.foxit.sdk.pdf.objects.PDFArray.removeAt | ( | int | index | ) | throws com.foxit.sdk.PDFException |
Remove an element in a specified position (by index) from current PDF array object.
[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 . |
void com.foxit.sdk.pdf.objects.PDFArray.setAt | ( | int | index, |
PDFObject | element | ||
) | throws com.foxit.sdk.PDFException |
Set a new PDF object at a specified position in current PDF array object.
[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. |