Foxit PDF SDK
fsdk.StructElement Class Reference

Public Member Functions

def GetChild (index)
 Get a child structure tree entity by index. More...
 
def GetChildCount ()
 Get the count of child structure tree entities in the current structure element. More...
 
def GetElementInfo (type)
 Get the structure element information. More...
 
def GetParentElement ()
 Get the parent structure element. More...
 
def GetStructureTypeName ()
 Get structure type name. More...
 
def HasElementInfo (type)
 Check whether the structure element information of a specific type exist. More...
 

Detailed Description

This class represents structure element.

Member Function Documentation

◆ GetChild()

def fsdk.StructElement.GetChild (   index)

Get a child structure tree entity by index.

Parameters
[in]indexIndex of a child structure tree entity to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.StructElement.GetChildCount .
Returns
A child structure tree entity object.

◆ GetChildCount()

def fsdk.StructElement.GetChildCount ( )

Get the count of child structure tree entities in the current structure element.

Returns
The count of child structure tree entities.

◆ GetElementInfo()

def fsdk.StructElement.GetElementInfo (   type)

Get the structure element information.

Before get structure element information, ensure that the function fsdk.StructElement.HasElementInfo has been called and returned true (using the corresponding type).

Parameters
[in]typeStructure element information type. Please refer to values starting from fsdk.StructElementE_ElementInfoTypeTitle and this would be one of these values.
Returns
Structure element information string.

◆ GetParentElement()

def fsdk.StructElement.GetParentElement ( )

Get the parent structure element.

Returns
Parent structure element. If function StructElement::IsEmpty for the returned object returns true, that means current element does not have a parent element.

◆ GetStructureTypeName()

def fsdk.StructElement.GetStructureTypeName ( )

Get structure type name.

Every structure element shall have a structure type, a name object that identifies the nature of the structure element and its role within the document (such as a chapter, paragraph, or footnote). Please refer to the description of "Standard Structure Types" in Section 10.7.3 of <PDF Reference 1.7> or the description of "Standard structure types" in Section 14.8.4 of <PDF Reference 2.0> for more details.

Returns
A string that represents structure type name of current structure element.

◆ HasElementInfo()

def fsdk.StructElement.HasElementInfo (   type)

Check whether the structure element information of a specific type exist.

Parameters
[in]typeStructure element information type. Please refer to values starting from fsdk.StructElementE_ElementInfoTypeTitle and this would be one of these values.
Returns
true means the element information type has element information, while false means the element information type does not have element information.