Foxit PDF SDK
|
Public Member Functions | |
def | PDFNameTree () |
Constructor. | |
def | PDFNameTree (other) |
Constructor, with another PDF name tree object. More... | |
def | Add (name, pdf_object) |
Add a new key name with a PDF object as its value. More... | |
def | GetCount () |
Get the count of elements in current name tree. More... | |
def | GetName (index) |
Get a key name in the name tree, by index. More... | |
def | GetObj (name) |
Get the value (as PDF object) of a specified key name. More... | |
def | GetType () |
Get the type of current name tree. More... | |
def | HasName (name) |
Check if the specified key name exists in current name tree. More... | |
def | IsEmpty () |
Check whether current object is empty or not. More... | |
def | RemoveAllObjs () |
Remove all key names from current name tree, along with theirs value (as PDF object). More... | |
def | RemoveObj (name) |
Remove a key name from current name tree, along with its value (as PDF object). More... | |
def | Rename (old_name, new_name) |
Rename an existing key name to a new key name. More... | |
def | SetObj (name, pdf_object) |
Set the value (as PDF object) of a specified key name. More... | |
Static Public Attributes | |
e_EmbeddedFiles = _fsdk.PDFNameTree_e_EmbeddedFiles | |
"EmbeddedFiles" name tree. | |
e_JavaScript = _fsdk.PDFNameTree_e_JavaScript | |
"JavaScript" name tree. | |
e_Pages = _fsdk.PDFNameTree_e_Pages | |
"Pages" name tree. | |
e_Templates = _fsdk.PDFNameTree_e_Templates | |
"Templates" name tree. | |
Name tree is a kind of common data structure in PDF. Name tree serves a similar purpose to PDF dictionary
def FoxitPDFSDKPython3.PDFNameTree.PDFNameTree | ( | other | ) |
Constructor, with another PDF name tree object.
[in] | other | Another PDF name tree object. |
def FoxitPDFSDKPython3.PDFNameTree.Add | ( | name, | |
pdf_object | |||
) |
Add a new key name with a PDF object as its value.
All PDF objects in the name tree are ordered by their names. When a new PDF object is added, Foxit PDF SDK will find a suitable place in the name tree to add it. After adding successfully, the indexes of some old keys may be changed.
[in] | name | String for a new key name. This should not be an empty string. This new name should not have existed in current name tree. |
[in] | pdf_object | A PDF object, to be set with the new name. The type of this PDF object should match current name tree; otherwise, the input PDF object is invalid. Please refer to comment of class PDFNameTree for more details. User should not release this PDF object after this function succeeds. |
def FoxitPDFSDKPython3.PDFNameTree.GetCount | ( | ) |
Get the count of elements in current name tree.
def FoxitPDFSDKPython3.PDFNameTree.GetName | ( | index | ) |
Get a key name in the name tree, by index.
[in] | index | Index of the key name to be retrieved. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython3.PDFNameTree.GetCount . |
def FoxitPDFSDKPython3.PDFNameTree.GetObj | ( | name | ) |
Get the value (as PDF object) of a specified key name.
[in] | name | String for a key name. It should not be an empty string. |
def FoxitPDFSDKPython3.PDFNameTree.GetType | ( | ) |
Get the type of current name tree.
def FoxitPDFSDKPython3.PDFNameTree.HasName | ( | name | ) |
Check if the specified key name exists in current name tree.
[in] | name | A string that represents the key name to be checked. It should not be an empty string. |
def FoxitPDFSDKPython3.PDFNameTree.IsEmpty | ( | ) |
Check whether current object is empty or not.
When the current object is empty, that means current object is useless.
def FoxitPDFSDKPython3.PDFNameTree.RemoveAllObjs | ( | ) |
Remove all key names from current name tree, along with theirs value (as PDF object).
def FoxitPDFSDKPython3.PDFNameTree.RemoveObj | ( | name | ) |
Remove a key name from current name tree, along with its value (as PDF object).
If the input name does not exist in current name tree, this function will return true directly.
[in] | name | String for a key name to be removed. This should not be an empty string. |
def FoxitPDFSDKPython3.PDFNameTree.Rename | ( | old_name, | |
new_name | |||
) |
Rename an existing key name to a new key name.
[in] | old_name | String for an old key name which is to be renamed. This should not be an empty string. This name should have existed in current name tree. |
[in] | new_name | String for a new key name. This should not be an empty string. This new name should not have existed in current name tree. |
def FoxitPDFSDKPython3.PDFNameTree.SetObj | ( | name, | |
pdf_object | |||
) |
Set the value (as PDF object) of a specified key name.
[in] | name | String for a key name. It should not be an empty string. This name should have existed in current name tree. |
[in] | pdf_object | A PDF object to be set as the name's value. It should not be null. The type of this PDF object should match current name tree; otherwise, the input PDF object is invalid. Please refer to comment of class PDFNameTree for more details. User should not release this PDF object after this function succeeds. |