Foxit PDF SDK
|
Public Types | |
enum | Type { Type.e_InvalidType = 0, Type.e_Boolean = 1, Type.e_Number = 2, Type.e_String = 3, Type.e_Name = 4, Type.e_Array = 5, Type.e_Dictionary = 6, Type.e_Stream = 7, Type.e_Null = 8, Type.e_Reference = 9 } |
Enumeration for PDF object type. More... | |
Public Member Functions | |
PDFObject | CloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
PDFObject | DeepCloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
PDFArray | GetArray () |
Get the PDF array object of current PDF object. More... | |
bool | GetBoolean () |
Get the boolean value of current PDF object. More... | |
DateTime | GetDateTime () |
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 () |
Get the float value of current PDF object. More... | |
int | GetInteger () |
Get the integer value of current PDF object. More... | |
Matrix2D | GetMatrix () |
Get the matrix value of current PDF object. More... | |
string | GetName () |
Get the name value of current PDF object. More... | |
int | GetObjNum () |
Get the indirect object number of current PDF object. More... | |
RectF | GetRect () |
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... | |
PDFObject.Type | GetType () |
Get the type of current PDF object. More... | |
string | GetWideString () |
Get the wide string value of current PDF object. More... | |
bool | IsIdentical (PDFObject pdf_obj) |
Check if input PDF object is identical with 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 PDFObject | CreateFromBoolean (bool 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... | |
PDF supports eight basic types of objects:
"Boolean value", "Integer and real number", "String", "Name", "Array", "Dictionary", "Stream", "The null
object". For more details about PDF objects, please refer to Section 3.2 "Objects" in <PDF Reference 1.7>.
Class PDFObject is a base class for all kinds of PDF objects. It offers different functions to create different kind of PDF objects. For "Array", "Dictionary" and "Stream" PDF object, please refer to derived classes foxit.pdf.objects.PDFArray , foxit.pdf.objects.PDFDictionary and PDFStream .
If user wants to make a newly created PDF object to be an indirect object, please call function pdf.PDFDoc.AddIndirectObject .
|
strong |
Enumeration for PDF object type.
Values of this enumeration should be used alone.
|
inline |
Clone current PDF object and get the cloned PDF object.
|
inlinestatic |
Create a PDF object from a boolean value.
[in] | boolean_value | A boolean value. |
Create a PDF object from date time.
PDF defines a standard date format, which closely follows that of the international standard ASN.1 (Abstract Syntax Notation One), defined in ISO/ IEC 8824 (see the Bibliography). A date is defined as an ASCII string of the form (D:YYYYMMDDHHmmSSOHH'mm').
[in] | date_time | A date and time object. |
|
inlinestatic |
Create a PDF object from a float number.
[in] | float_value | A float value. |
|
inlinestatic |
Create a PDF object from a integer number.
[in] | integer_value | An integer value. |
|
inlinestatic |
Create a PDF object from a string which represents a name.
[in] | name | A string. It should not be an empty string. |
|
inlinestatic |
Create a PDF object from string.
[in] | string_value | A string. It should not be an empty string. |
|
inlinestatic |
Create a reference for an indirect object.
The indirect object can be retrieved by following methods:
Returned by function pdf.PDFDoc.GetIndirectObject .
Returned by function pdf.PDFDoc.AddIndirectObject , when try to add a direct PDF object to PDF document and make it to be an indirect object.
[in] | document | A valid PDF document object. |
[in] | object_number | The indirect object number of the indirect PDF object. This should be above 0. |
|
inline |
Clone current PDF object and get the cloned PDF object.
This function is a totally direct copy, without any reference object inside, so the copy object can be copied to another document.
|
inline |
Get the PDF array object of current PDF object.
If the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Reference , this function will check the direct PDF object of current PDF object.
|
inline |
Get the boolean value of current PDF object.
Only useful when the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Boolean .
|
inline |
Get the date time value of current PDF object.
Only useful when the type of current PDF objec is foxit.pdf.objects.PDFObject.Type.e_String and its content is in PDF standard date format.
|
inline |
Get the PDF dictionary object of current PDF object.
If the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Reference , this function will check the direct PDF object of current PDF object.
|
inline |
Get the direct object of current PDF object.
If the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Reference , the direct object will be returned.
|
inline |
Get the float value of current PDF object.
Only useful when the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Number .
|
inline |
Get the integer value of current PDF object.
Only useful when the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Number .
|
inline |
Get the matrix value of current PDF object.
Only useful for PDF object whose type is foxit.pdf.objects.PDFObject.Type.e_Array and it has 6 number objects as elements.
|
inline |
Get the name value of current PDF object.
Only useful when the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Name or foxit.pdf.objects.PDFObject.Type.e_String .
|
inline |
Get the indirect object number of current PDF object.
0 if current PDF object is a direct object.
above 0 if current PDF object is an indirect object.
-1 means there is any error.
|
inline |
Get the rectangle value of current PDF object.
Only useful for PDF object whose type is foxit.pdf.objects.PDFObject.Type.e_Array and it has 4 number objects as elements.
|
inline |
Get the PDF stream object of current PDF object.
If the type of current PDF object is foxit.pdf.objects.PDFObject.Type.e_Reference , this function will check the direct PDF object of current PDF object.
|
inline |
Get the string value of current PDF object.
This function will get the string format for actual value of current PDF object:
If object type is foxit.pdf.objects.PDFObject.Type.e_Boolean , "true" or "false" string value will be returned, depending on its actual value.
If object type is foxit.pdf.objects.PDFObject.Type.e_Number , the value will be represents as a string. For example, "1.5" string is for value 1.5.
If object type is foxit.pdf.objects.PDFObject.Type.e_String , the string value will be retrieved directly.
If value of current PDF object cannot be converted to a valid string, an empty string will be returned.
|
inline |
Get the type of current PDF object.
|
inline |
Get the wide string value of current PDF object.
This function will get the string format for actual value of current PDF object:
If object type is foxit.pdf.objects.PDFObject.Type.e_Boolean , "true" or "false" string value will be returned, depending on its actual value.
If object type is foxit.pdf.objects.PDFObject.Type.e_Number , the value will be represents as a string. For example, "1.5" string is for value 1.5.
If object type is foxit.pdf.objects.PDFObject.Type.e_String , the string value will be retrieved directly.
If value of current PDF object cannot be converted to a valid string, an empty string will be returned.
|
inline |
Check if input PDF object is identical with current PDF object.
[in] | pdf_obj | Another PDF object which is to be check with current PDF object. |
|
inline |
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.
This function should be called only for a newly created PDF object or a cloned PDF object, which has not been added or set to other PDF object or related to PDF document, and will not be used any more. Please do not use this function for other case, otherwise unknown error may occur.