Foxit PDF SDK
|
Public Member Functions | |
def | CloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
def | DeepCloneObject () |
Clone current PDF object and get the cloned PDF object. More... | |
def | GetArray () |
Get the PDF array object of current PDF object. More... | |
def | GetBoolean () |
Get the boolean value of current PDF object. More... | |
def | GetDateTime () |
Get the date time value of current PDF object. More... | |
def | GetDict () |
Get the PDF dictionary object of current PDF object. More... | |
def | GetDirectObject () |
Get the direct object of current PDF object. More... | |
def | GetFloat () |
Get the float value of current PDF object. More... | |
def | GetInteger () |
Get the integer value of current PDF object. More... | |
def | GetMatrix () |
Get the matrix value of current PDF object. More... | |
def | GetName () |
Get the name value of current PDF object. More... | |
def | GetObjNum () |
Get the indirect object number of current PDF object. More... | |
def | GetRect () |
Get the rectangle value of current PDF object. More... | |
def | GetStream () |
Get the PDF stream object of current PDF object. More... | |
def | GetString () |
Get the string value of current PDF object. More... | |
def | GetType () |
Get the type of current PDF object. More... | |
def | GetWideString () |
Get the wide string value of current PDF object. More... | |
def | IsIdentical (pdf_obj) |
Check if input PDF object is identical with current PDF object. More... | |
def | 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 Attributes | |
CreateFromBoolean = _fsdk.PDFObject_CreateFromBoolean | |
Create a PDF object from a boolean value. More... | |
CreateFromDateTime = _fsdk.PDFObject_CreateFromDateTime | |
Create a PDF object from date time. More... | |
CreateFromFloat = _fsdk.PDFObject_CreateFromFloat | |
Create a PDF object from a float number. More... | |
CreateFromInteger = _fsdk.PDFObject_CreateFromInteger | |
Create a PDF object from a integer number. More... | |
CreateFromName = _fsdk.PDFObject_CreateFromName | |
Create a PDF object from a string which represents a name. More... | |
CreateFromString = _fsdk.PDFObject_CreateFromString | |
Create a PDF object from string. More... | |
CreateReference = _fsdk.PDFObject_CreateReference | |
Create a reference for an indirect object. More... | |
e_Array = _fsdk.PDFObject_e_Array | |
PDF array object. | |
e_Boolean = _fsdk.PDFObject_e_Boolean | |
PDF boolean object. | |
e_Dictionary = _fsdk.PDFObject_e_Dictionary | |
PDF dictionary object. | |
e_InvalidType = _fsdk.PDFObject_e_InvalidType | |
Invalid PDF object type. | |
e_Name = _fsdk.PDFObject_e_Name | |
PDF name object. | |
e_Null = _fsdk.PDFObject_e_Null | |
PDF null object. | |
e_Number = _fsdk.PDFObject_e_Number | |
PDF number object. | |
e_Reference = _fsdk.PDFObject_e_Reference | |
PDF reference object. | |
e_Stream = _fsdk.PDFObject_e_Stream | |
PDF stream object. | |
e_String = _fsdk.PDFObject_e_String | |
PDF string object. | |
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 FoxitPDFSDKPython2.PDFArray , FoxitPDFSDKPython2.PDFDictionary and PDFStream .
If user wants to make a newly created PDF object to be an indirect object, please call function FoxitPDFSDKPython2.PDFDoc.AddIndirectObject .
def FoxitPDFSDKPython2.PDFObject.CloneObject | ( | ) |
Clone current PDF object and get the cloned PDF object.
Please call FoxitPDFSDKPython2.PDFObject.Release to release the new object if it has not been added/set into PDF document or other PDF object and will not be used any more.
def FoxitPDFSDKPython2.PDFObject.DeepCloneObject | ( | ) |
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. Please call FoxitPDFSDKPython2.PDFObject.Release to release the new object if it has not been added/set into PDF document or other PDF object and will not be used any more.
def FoxitPDFSDKPython2.PDFObject.GetArray | ( | ) |
Get the PDF array object of current PDF object.
If the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Reference , this function will check the direct PDF object of current PDF object.
def FoxitPDFSDKPython2.PDFObject.GetBoolean | ( | ) |
Get the boolean value of current PDF object.
Only useful when the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Boolean .
def FoxitPDFSDKPython2.PDFObject.GetDateTime | ( | ) |
Get the date time value of current PDF object.
Only useful when the type of current PDF objec is FoxitPDFSDKPython2.PDFObject.e_String and its content is in PDF standard date format.
def FoxitPDFSDKPython2.PDFObject.GetDict | ( | ) |
Get the PDF dictionary object of current PDF object.
If the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Reference , this function will check the direct PDF object of current PDF object.
def FoxitPDFSDKPython2.PDFObject.GetDirectObject | ( | ) |
Get the direct object of current PDF object.
If the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Reference , the direct object will be returned.
def FoxitPDFSDKPython2.PDFObject.GetFloat | ( | ) |
Get the float value of current PDF object.
Only useful when the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Number .
def FoxitPDFSDKPython2.PDFObject.GetInteger | ( | ) |
Get the integer value of current PDF object.
Only useful when the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Number .
def FoxitPDFSDKPython2.PDFObject.GetMatrix | ( | ) |
Get the matrix value of current PDF object.
Only useful for PDF object whose type is FoxitPDFSDKPython2.PDFObject.e_Array and it has 6 number objects as elements.
def FoxitPDFSDKPython2.PDFObject.GetName | ( | ) |
Get the name value of current PDF object.
Only useful when the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Name or FoxitPDFSDKPython2.PDFObject.e_String .
def FoxitPDFSDKPython2.PDFObject.GetObjNum | ( | ) |
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.
def FoxitPDFSDKPython2.PDFObject.GetRect | ( | ) |
Get the rectangle value of current PDF object.
Only useful for PDF object whose type is FoxitPDFSDKPython2.PDFObject.e_Array and it has 4 number objects as elements.
def FoxitPDFSDKPython2.PDFObject.GetStream | ( | ) |
Get the PDF stream object of current PDF object.
If the type of current PDF object is FoxitPDFSDKPython2.PDFObject.e_Reference , this function will check the direct PDF object of current PDF object.
def FoxitPDFSDKPython2.PDFObject.GetString | ( | ) |
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 FoxitPDFSDKPython2.PDFObject.e_Boolean , "true" or "false" string value will be returned, depending on its actual value.
If object type is FoxitPDFSDKPython2.PDFObject.e_Number , the value will be represents as a string. For example, "1.5" string is for value 1.5.
If object type is FoxitPDFSDKPython2.PDFObject.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.
def FoxitPDFSDKPython2.PDFObject.GetType | ( | ) |
Get the type of current PDF object.
def FoxitPDFSDKPython2.PDFObject.GetWideString | ( | ) |
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 FoxitPDFSDKPython2.PDFObject.e_Boolean , "true" or "false" string value will be returned, depending on its actual value.
If object type is FoxitPDFSDKPython2.PDFObject.e_Number , the value will be represents as a string. For example, "1.5" string is for value 1.5.
If object type is FoxitPDFSDKPython2.PDFObject.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.
def FoxitPDFSDKPython2.PDFObject.IsIdentical | ( | pdf_obj | ) |
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. |
def FoxitPDFSDKPython2.PDFObject.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.
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.
|
static |
Create a PDF object from a boolean value.
Please call function FoxitPDFSDKPython2.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.
[in] | boolean_value | A boolean value. |
|
static |
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'). Please call function FoxitPDFSDKPython2.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.
[in] | date_time | A date and time object. |
|
static |
Create a PDF object from a float number.
Please call function FoxitPDFSDKPython2.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.
[in] | float_value | A float value. |
|
static |
Create a PDF object from a integer number.
Please call function FoxitPDFSDKPython2.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.
[in] | integer_value | An integer value. |
|
static |
Create a PDF object from a string which represents a name.
Please call function FoxitPDFSDKPython2.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.
[in] | name | A string. It should not be an empty string. |
|
static |
Create a PDF object from string.
Please call function FoxitPDFSDKPython2.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.
[in] | string_value | A string. It should not be an empty string. |
|
static |
Create a reference for an indirect object.
The indirect object can be retrieved by following methods:
Returned by function FoxitPDFSDKPython2.PDFDoc.GetIndirectObject .
Returned by function FoxitPDFSDKPython2.PDFDoc.AddIndirectObject , when try to add a direct PDF object to PDF document and make it to be an indirect object.
Please call function FoxitPDFSDKPython2.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.
[in] | document | A valid PDF document object. |
[in] | object_number | The indirect object number of the indirect PDF object. This should be above 0. |