Foxit PDF SDK

Public Types | Public Member Functions | List of all members
foxit.pdf.objects.StructElement Class Reference
Inheritance diagram for foxit.pdf.objects.StructElement:

## Public Types
enum | ElementInfoType { ElementInfoType.e_ElementInfoTypeTitle = 0, ElementInfoType.e_ElementInfoTypeLanguage = 1, ElementInfoType.e_ElementInfoTypeAltDescription = 2, ElementInfoType.e_ElementInfoTypeExpandedForm = 3, ElementInfoType.e_ElementInfoTypeActualText = 4 }
| Enumeration for structure element info type. More...
Public Types inherited from foxit.pdf.objects.StructTreeEntity
enum | StructTreeEntityType { StructTreeEntityType.e_UnknownType = -1, StructTreeEntityType.e_StructTreeEntityTypeElement = 0, StructTreeEntityType.e_StructTreeEntityTypeMarkedContent = 1, StructTreeEntityType.e_StructTreeEntityTypeObjectContent = 2 }
| Enumeration for structure tree entity type. More...

## Public Member Functions
| StructElement ()
| Constructor.
StructTreeEntity | GetChild (int index)
| Get a child structure tree entity by index. More...
int | GetChildCount ()
| Get the count of child structure tree entities in the current structure element. More...
string | GetElementInfo (StructElement.ElementInfoType type)
| Get the structure element information. More...
StructElement | GetParentElement ()
| Get the parent structure element. More...
string | GetStructureTypeName ()
| Get structure type name. More...
bool | HasElementInfo (StructElement.ElementInfoType type)
| Check whether the structure element information of a specific type exist. More...
void | RemoveChild (int index)
| Remove a child structure tree entity by index. More...
Public Member Functions inherited from foxit.pdf.objects.StructTreeEntity
| StructTreeEntity ()
| Constructor.
| StructTreeEntity (StructTreeEntity other)
| Constructor, with another structure element entity object. More...
PDFPage | GetPage ()
| Get the related PDF page. More...
StructTreeEntity.StructTreeEntityType | GetType ()
| Get structure tree entity type. More...
bool | IsEmpty ()
| Check whether current object is empty or not. More...

## Detailed Description

This class represents structure element.

## Member Enumeration Documentation

## ◆ ElementInfoType

enum foxit.pdf.objects.StructElement.ElementInfoType
| strong

Enumeration for structure element info type.

Values of this enumeration should be used alone.

Enumerator
e_ElementInfoTypeTitle | Structure element info type: Title, which means the title of the structure element. A text string representing it in human-readable form.
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_ElementInfoTypeAltDescription | Structure element info type: Alternative Description, which means the alternative description of structure element.
e_ElementInfoTypeExpandedForm | Structure element info type: Expanded Form, which means the expanded form of structure element.
e_ElementInfoTypeActualText | Structure element info type: Actual Text, which means the actual text of structure element.

## Member Function Documentation

## ◆ GetChild()

StructTreeEntity foxit.pdf.objects.StructElement.GetChild | ( | int | index | ) |
| inline

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 StructElement.GetChildCount .

Returns
  A child structure tree entity object.

## ◆ GetChildCount()

int foxit.pdf.objects.StructElement.GetChildCount | ( |  | ) |
| inline

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

Returns
  The count of child structure tree entities.

## ◆ GetElementInfo()

string foxit.pdf.objects.StructElement.GetElementInfo | ( | StructElement.ElementInfoType | type | ) |
| inline

Get the structure element information.

Before get structure element information, ensure that the function 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 foxit.pdf.objects.StructElement.ElementInfoType.e_ElementInfoTypeTitle and this would be one of these values.

Returns
  Structure element information string.

## ◆ GetParentElement()

StructElement foxit.pdf.objects.StructElement.GetParentElement | ( |  | ) |
| inline

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()

string foxit.pdf.objects.StructElement.GetStructureTypeName | ( |  | ) |
| inline

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()

bool foxit.pdf.objects.StructElement.HasElementInfo | ( | StructElement.ElementInfoType | type | ) |
| inline

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

Parameters

  [in] | type | Structure element information type. Please refer to values starting from foxit.pdf.objects.StructElement.ElementInfoType.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()

void foxit.pdf.objects.StructElement.RemoveChild | ( | int | index | ) |
| inline

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 StructElement.GetChildCount .

Returns
  None.