Foxit PDF SDK

Public Member Functions | Static Public Attributes | List of all members
FoxitPDFSDKPython2.StructElement Class Reference
Inheritance diagram for FoxitPDFSDKPython2.StructElement:

## Public Member Functions
def | StructElement ()
| Constructor. More...
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...
def | RemoveChild (index)
| Remove a child structure tree entity by index. More...
Public Member Functions inherited from FoxitPDFSDKPython2.StructTreeEntity
def | StructTreeEntity ()
| Constructor. More...
def | GetPage ()
| Get the related PDF page. More...
def | GetType ()
| Get structure tree entity type. More...
def | IsEmpty ()
| Check whether current object is empty or not. More...

## Static Public Attributes
| e_ElementInfoTypeActualText = _fsdk.StructElement_e_ElementInfoTypeActualText
| Structure element info type: Actual Text, which means the actual text of structure element.
| e_ElementInfoTypeAltDescription = _fsdk.StructElement_e_ElementInfoTypeAltDescription
| Structure element info type: Alternative Description, which means the alternative description of structure element.
| e_ElementInfoTypeExpandedForm = _fsdk.StructElement_e_ElementInfoTypeExpandedForm
| Structure element info type: Expanded Form, which means the expanded form of structure element.
| e_ElementInfoTypeLanguage = _fsdk.StructElement_e_ElementInfoTypeLanguage
| Structure element info type: Language, which means the natural language for all text in the structure element except where overridden by language specifications for nested structure elements or marked content.
| e_ElementInfoTypeTitle = _fsdk.StructElement_e_ElementInfoTypeTitle
| Structure element info type: Title, which means the title of the structure element. A text string representing it in human-readable form.
Static Public Attributes inherited from FoxitPDFSDKPython2.StructTreeEntity
| e_StructTreeEntityTypeElement = _fsdk.StructTreeEntity_e_StructTreeEntityTypeElement
| Structure tree entity type: Element, which represents a structure element.
| e_StructTreeEntityTypeMarkedContent = _fsdk.StructTreeEntity_e_StructTreeEntityTypeMarkedContent
| Structure tree entity type: MarkedContent, which represents a marked-content item.
| e_StructTreeEntityTypeObjectContent = _fsdk.StructTreeEntity_e_StructTreeEntityTypeObjectContent
| Structure tree entity type: ObjectContent, which represents a PDF object content item, such as annotation and XObject.
| e_UnknownType = _fsdk.StructTreeEntity_e_UnknownType
| Structure tree entity type: unknown.

## Detailed Description

This class represents structure element.

## Constructor & Destructor Documentation

## ◆ StructElement()

def FoxitPDFSDKPython2.StructElement.StructElement | ( |  | ) |

Constructor.

Constructor, with another structure element object.

Parameters

  [in] | other | Another structure element object.

## Member Function Documentation

## ◆ GetChild()

def FoxitPDFSDKPython2.StructElement.GetChild | ( |  | index | ) |

Get a child structure tree entity by index.

Parameters

  [in] | index | Index of a child structure tree entity to be retrieved. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.StructElement.GetChildCount .

Returns
  A child structure tree entity object.

## ◆ GetChildCount()

def FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.StructElement.GetElementInfo | ( |  | type | ) |

Get the structure element information.

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

Parameters

  [in] | type | Structure element information type. Please refer to values starting from FoxitPDFSDKPython2.StructElement.e_ElementInfoTypeTitle and this would be one of these values.

Returns
  Structure element information string.

## ◆ GetParentElement()

def FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.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 FoxitPDFSDKPython2.StructElement.HasElementInfo | ( |  | type | ) |

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

Parameters

  [in] | type | Structure element information type. Please refer to values starting from FoxitPDFSDKPython2.StructElement.e_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.

## ◆ RemoveChild()

def FoxitPDFSDKPython2.StructElement.RemoveChild | ( |  | index | ) |

Remove a child structure tree entity by index.

Parameters

  [in] | index | Index of a child structure tree entity to be retrieved. Valid range: from 0 to (count-1). count is returned by function FoxitPDFSDKPython2.StructElement.GetChildCount .

Returns
  None.