Foxit PDF SDK

Public Member Functions | List of all members
FoxitPDFSDKPython3.PortfolioFolderNode Class Reference
Inheritance diagram for FoxitPDFSDKPython3.PortfolioFolderNode:

## Public Member Functions
def | PortfolioFolderNode (other)
| Constructor, with parent class object. More...
def | AddFile (file_path)
| Add a file (specified by file path) to be a sub node. More...
def | AddFile (file_stream, file_name)
| Add a file (specified with FoxitPDFSDKPython3.StreamCallback ) to be a sub node. More...
def | AddPDFDoc (pdf_doc, file_name)
| Add an loaded PDF document to be a sub node. More...
def | AddSubFolder (folder_name)
| Add a new sub folder. More...
def | GetCreationDateTime ()
| Get the creation date time. More...
def | GetDescription ()
| Get description. More...
def | GetModifiedDateTime ()
| Get the last modified date time. More...
def | GetName ()
| Get name of current folder node. More...
def | GetSortedSubNodes ()
| Get sub nodes array, which has been sorted according to sorting order and specified field name defined in class Portfolio . More...
def | IsRoot ()
| Check if current folder node represents root node. More...
def | RemoveSubNode (sub_node)
| Remove a sub node. More...
def | SetDescription (description)
| Set description. More...
Public Member Functions inherited from FoxitPDFSDKPython3.PortfolioNode
def | PortfolioNode (other)
| Constructor, with another portfolio node object. More...
def | GetNodeType ()
| Get node type. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...

## Additional Inherited Members
Static Public Attributes inherited from FoxitPDFSDKPython3.PortfolioNode
| e_TypeFile = _fsdk.PortfolioNode_e_TypeFile
| Portfolio node type: file.
| e_TypeFolder = _fsdk.PortfolioNode_e_TypeFolder
| Portfolio node type: folder.
| e_TypeUnknown = _fsdk.PortfolioNode_e_TypeUnknown
| Unknown portfolio node type.

## Detailed Description

Portfolio folder node is used as a folder, which can contain file and other folder as sub nodes.
Class PortfolioFolderNode is derived from class PortfolioNode . It offers function to access a folder node: add file/folder to folder node, remove sub node from folder node, get all the sub nodes in sorted order, and get/set some properties of folder node.

## Constructor & Destructor Documentation

## ◆ PortfolioFolderNode()

def FoxitPDFSDKPython3.PortfolioFolderNode.PortfolioFolderNode | ( |  | other | ) |

Constructor, with parent class object.

Parameters

  [in] | other | Parent class object.

## Member Function Documentation

## ◆ AddFile() [1/2]

def FoxitPDFSDKPython3.PortfolioFolderNode.AddFile | ( |  | file_path | ) |

Add a file (specified by file path) to be a sub node.

Foxit PDF SDK will retrieve some properties (such as file name, modified date and etc.) from input file path and set them to the file specification object of returned file node. User can also update properties by functions in class FileSpec for the returned file node.

Parameters

  [in] | file_path | A full path of an existing local file.

Returns
  Newly added file node object.

## ◆ AddFile() [2/2]

def FoxitPDFSDKPython3.PortfolioFolderNode.AddFile | ( |  | file_stream,
|  |  | file_name
| ) |  |

Add a file (specified with FoxitPDFSDKPython3.StreamCallback ) to be a sub node.

Foxit PDF SDK CANNOT retrieve any property from input stream callback. So user should update properties by functions in class FileSpec for returned file node.

Parameters

  [in] | file_stream | A FoxitPDFSDKPython3.StreamCallback object which is implemented by user to read the file content.
  [in] | file_name | File name for the file specified by stream callback. This name will be used in file specification which is related with the returned file node object.

Returns
  Newly added file node object.

## ◆ AddPDFDoc()

def FoxitPDFSDKPython3.PortfolioFolderNode.AddPDFDoc | ( |  | pdf_doc,
|  |  | file_name
| ) |  |

Add an loaded PDF document to be a sub node.

Foxit PDF SDK will try to retrieve properties (such as creation date and modified date) from input PDF document's metadata and set them to the file specification object of returned file node. User can also update properties by functions in class FileSpec for the returned file node.

Parameters

  [in] | pdf_doc | A valid PDF document object which has been loaded successsfully.
  [in] | file_name | File name for the file specified by stream callback. This name will be used in file specification which is related with the returned file node object.

Returns
  Newly added file node object.

## ◆ AddSubFolder()

def FoxitPDFSDKPython3.PortfolioFolderNode.AddSubFolder | ( |  | folder_name | ) |

Add a new sub folder.

Parameters

  [in] | folder_name | Folder name for the new sub folder.

Returns
  Newly added folder node object.

## ◆ GetCreationDateTime()

def FoxitPDFSDKPython3.PortfolioFolderNode.GetCreationDateTime | ( |  | ) |

Get the creation date time.

Returns
  Creation date time.

## ◆ GetDescription()

def FoxitPDFSDKPython3.PortfolioFolderNode.GetDescription | ( |  | ) |

Get description.

Returns
  Description string.

## ◆ GetModifiedDateTime()

def FoxitPDFSDKPython3.PortfolioFolderNode.GetModifiedDateTime | ( |  | ) |

Get the last modified date time.

If structure of sub nodes is changed (such as add file/folder, remove sub node), Foxit PDF SDK will update last modified date time of current folder node automatically.

Returns
  Last modified date time.

## ◆ GetName()

def FoxitPDFSDKPython3.PortfolioFolderNode.GetName | ( |  | ) |

Get name of current folder node.

Returns
  Name of current folder node. If current folder node is the root node, usually it does not have a name and an empty string will be return for this case.

## ◆ GetSortedSubNodes()

def FoxitPDFSDKPython3.PortfolioFolderNode.GetSortedSubNodes | ( |  | ) |

Get sub nodes array, which has been sorted according to sorting order and specified field name defined in class Portfolio .

If the type of values (which are to be compared) is string, Foxit PDF SDK will compare these string values without taking care of whether a character is a capital or a small letter.

Returns
  An array of sorted sub nodes.

## ◆ IsRoot()

def FoxitPDFSDKPython3.PortfolioFolderNode.IsRoot | ( |  | ) |

Check if current folder node represents root node.

Returns
  true means current folder node is the root node, while false means current folder node is not the root node.

## ◆ RemoveSubNode()

def FoxitPDFSDKPython3.PortfolioFolderNode.RemoveSubNode | ( |  | sub_node | ) |

Remove a sub node.

Parameters

  [in] | sub_node | A node object which represents a sub node of current node to be removed.

Returns
  None.

## ◆ SetDescription()

def FoxitPDFSDKPython3.PortfolioFolderNode.SetDescription | ( |  | description | ) |

Set description.

Parameters

  [in] | description | Description string to be set. This can be an empty string.

Returns
  None.