Foxit PDF SDK
com.foxit.sdk.pdf.objects.StructElement Class Reference
Inheritance diagram for com.foxit.sdk.pdf.objects.StructElement:
com.foxit.sdk.pdf.objects.StructTreeEntity com.foxit.sdk.common.Base

Public Member Functions

 StructElement ()
 Constructor.

 
synchronized void delete ()
 Clean up related resources immediately. More...
 
StructTreeEntity getChild (int index) throws com.foxit.sdk.PDFException
 Get a child structure tree entity by index.
More...
 
int getChildCount () throws com.foxit.sdk.PDFException
 Get the count of child structure tree entities in the current structure element.
More...
 
String getElementInfo (int type) throws com.foxit.sdk.PDFException
 Get the structure element information.
More...
 
StructElement getParentElement () throws com.foxit.sdk.PDFException
 Get the parent structure element.
More...
 
String getStructureTypeName () throws com.foxit.sdk.PDFException
 Get structure type name.
More...
 
boolean hasElementInfo (int type) throws com.foxit.sdk.PDFException
 Check whether the structure element information of a specific type exist.
More...
 
- Public Member Functions inherited from com.foxit.sdk.pdf.objects.StructTreeEntity
 StructTreeEntity ()
 Constructor.

 
 StructTreeEntity (StructTreeEntity other)
 Constructor, with another structure element entity object.
More...
 
PDFPage getPage () throws com.foxit.sdk.PDFException
 Get the related PDF page.
More...
 
int getType () throws com.foxit.sdk.PDFException
 Get structure tree entity type.
More...
 
boolean isEmpty ()
 Check whether current object is empty or not.
More...
 

Static Public Attributes

static final int e_ElementInfoTypeActualText = 4
 Structure element info type: Actual Text, which means the actual text of structure element.

 
static final int e_ElementInfoTypeAltDescription = 2
 Structure element info type: Alternative Description, which means the alternative description of structure element.

 
static final int e_ElementInfoTypeExpandedForm = 3
 Structure element info type: Expanded Form, which means the expanded form of structure element.

 
static final int e_ElementInfoTypeLanguage = 1
 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.

 
static final int e_ElementInfoTypeTitle = 0
 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 com.foxit.sdk.pdf.objects.StructTreeEntity
static final int e_StructTreeEntityTypeElement = 0
 Structure tree entity type: Element, which represents a structure element.

 
static final int e_StructTreeEntityTypeMarkedContent = 1
 Structure tree entity type: MarkedContent, which represents a marked-content item.

 
static final int e_StructTreeEntityTypeObjectContent = 2
 Structure tree entity type: ObjectContent, which represents a PDF object content item, such as annotation and XObject.

 
static final int e_UnknownType = -1
 Structure tree entity type: unknown.

 

Detailed Description

This class represents structure element.

Member Function Documentation

◆ delete()

synchronized void com.foxit.sdk.pdf.objects.StructElement.delete ( )

Clean up related resources immediately.

Returns
None.
Note
Once this function is called, current object cannot be used anymore.

Reimplemented from com.foxit.sdk.pdf.objects.StructTreeEntity.

◆ getChild()

StructTreeEntity com.foxit.sdk.pdf.objects.StructElement.getChild ( int  index) throws com.foxit.sdk.PDFException

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 StructElement.getChildCount .
Returns
A child structure tree entity object.

◆ getChildCount()

int com.foxit.sdk.pdf.objects.StructElement.getChildCount ( ) throws com.foxit.sdk.PDFException

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

Returns
The count of child structure tree entities.

◆ getElementInfo()

String com.foxit.sdk.pdf.objects.StructElement.getElementInfo ( int  type) throws com.foxit.sdk.PDFException

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]typeStructure element information type. Please refer to values starting from com.foxit.sdk.pdf.objects.StructElement.e_ElementInfoTypeTitle and this would be one of these values.
Returns
Structure element information string.

◆ getParentElement()

StructElement com.foxit.sdk.pdf.objects.StructElement.getParentElement ( ) throws com.foxit.sdk.PDFException

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 com.foxit.sdk.pdf.objects.StructElement.getStructureTypeName ( ) throws com.foxit.sdk.PDFException

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

boolean com.foxit.sdk.pdf.objects.StructElement.hasElementInfo ( int  type) throws com.foxit.sdk.PDFException

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

Parameters
[in]typeStructure element information type. Please refer to values starting from com.foxit.sdk.pdf.objects.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.