Foxit PDF SDK
fsdk.LRStructureElement Class Reference

Public Member Functions

def GetAttributeValueARGB (type, index)
 Get an ARGB value (specified by index) for specified attribute type. More...
 
def GetAttributeValueCount (type)
 Get value count of a specified attribute type. More...
 
def GetAttributeValueElement (type, index)
 Get an structure element object (specified by index) for specified attribute type. More...
 
def GetAttributeValueEnum (type, index)
 Get an enum value (specified by index) for specified attribute type. More...
 
def GetAttributeValueFloat (type, index)
 Get a float value (specified by index) for specified attribute type. More...
 
def GetAttributeValueInt32 (type, index)
 Get an integer value (specified by index) for specified attribute type. More...
 
def GetAttributeValueString (type, index)
 Get a string value (specified by index) for specified attribute type. More...
 
def GetAttributeValueType (type)
 Get attribute value type for a specified attribute type. More...
 
def GetBBox ()
 Get bounding box. More...
 
def GetChild (index)
 Get a child element by index. More...
 
def GetChildCount ()
 Get the count of children elements. More...
 
def GetParentElement ()
 Get the parent element. More...
 
def GetSupportedAttribute (index)
 Get a supported attribute type by index. More...
 
def GetSupportedAttributeCount ()
 Get supported attribute count. More...
 

Detailed Description

This class represents a structure element. A structure element can be used to construct a tree, like graphics structure element, paragraph structure element, span structure element and so on.

Member Function Documentation

◆ GetAttributeValueARGB()

def fsdk.LRStructureElement.GetAttributeValueARGB (   type,
  index 
)

Get an ARGB value (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeARGB or fsdk.LRStructureElementE_AttributeValueTypeARGBArray . For other value type, this function will return 0.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
ARGB value.

◆ GetAttributeValueCount()

def fsdk.LRStructureElement.GetAttributeValueCount (   type)

Get value count of a specified attribute type.

  • When the value type of an attribute type represents an array, this function returns the size of the array.

  • When the value type of an attribute type does not represent an array, this function will alway return 1.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
Returns
Value count of a specified attribute type.

◆ GetAttributeValueElement()

def fsdk.LRStructureElement.GetAttributeValueElement (   type,
  index 
)

Get an structure element object (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeElement or fsdk.LRStructureElementE_AttributeValueTypeElementArray . For other value type, this function will return a structure element whose function LRStructureElement::IsEmpty returns true.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
A structure element.

◆ GetAttributeValueEnum()

def fsdk.LRStructureElement.GetAttributeValueEnum (   type,
  index 
)

Get an enum value (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeEnum or fsdk.LRStructureElementE_AttributeValueTypeEnumArray . For other value type, this function will return fsdk.LRStructureElementE_AttributeValueEnumInvalid .

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
An enum value. Please refer to values starting from fsdk.LRStructureElementE_AttributeValueEnumInvalid and this would be one of these values.

◆ GetAttributeValueFloat()

def fsdk.LRStructureElement.GetAttributeValueFloat (   type,
  index 
)

Get a float value (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeFloat or fsdk.LRStructureElementE_AttributeValueTypeFloatArray . For other value type, this function will return 0.0.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
Float value.

◆ GetAttributeValueInt32()

def fsdk.LRStructureElement.GetAttributeValueInt32 (   type,
  index 
)

Get an integer value (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeInt32 or fsdk.LRStructureElementE_AttributeValueTypeInt32Array . For other value type, this function will return 0.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
Integer value.

◆ GetAttributeValueString()

def fsdk.LRStructureElement.GetAttributeValueString (   type,
  index 
)

Get a string value (specified by index) for specified attribute type.

This function is available for attributes whose value type is fsdk.LRStructureElementE_AttributeValueTypeWStr or fsdk.LRStructureElementE_AttributeValueTypeWStrArray . For other value type, this function will return an empty string.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
[in]indexIndex to specify which value will be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetAttributeValueCount .
Returns
Wide string value.

◆ GetAttributeValueType()

def fsdk.LRStructureElement.GetAttributeValueType (   type)

Get attribute value type for a specified attribute type.

Parameters
[in]typeAttribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeTypeRole and this should be one of these values.
Returns
Value type for the specified attribute type. Please refer to values starting from fsdk.LRStructureElementE_AttributeValueTypeEmpty and this would be one of these values.

◆ GetBBox()

def fsdk.LRStructureElement.GetBBox ( )

Get bounding box.

Returns
Bounding box.

◆ GetChild()

def fsdk.LRStructureElement.GetChild (   index)

Get a child element by index.

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

◆ GetChildCount()

def fsdk.LRStructureElement.GetChildCount ( )

Get the count of children elements.

Returns
Count of children elements.

◆ GetParentElement()

def fsdk.LRStructureElement.GetParentElement ( )

Get the parent element.

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

◆ GetSupportedAttribute()

def fsdk.LRStructureElement.GetSupportedAttribute (   index)

Get a supported attribute type by index.

Parameters
[in]indexIndex for a supported attribute whose type is to be retrieved. Valid range: from 0 to (count-1). count is returned by function fsdk.LRStructureElement.GetSupportedAttributeCount .
Returns
Attribute type of the attribute specified by index.

◆ GetSupportedAttributeCount()

def fsdk.LRStructureElement.GetSupportedAttributeCount ( )

Get supported attribute count.

Returns
Count of supported attribute.