Foxit PDF SDK
foxit.addon.layoutrecognition.LRElement Class Reference
Inheritance diagram for foxit.addon.layoutrecognition.LRElement:
foxit.common.Base foxit.addon.layoutrecognition.LRContentElement foxit.addon.layoutrecognition.LRGraphicsObjectElement foxit.addon.layoutrecognition.LRStructureElement

Public Types

enum  ElementType : uint {
  ElementType.e_ElementTypeDocument = 0x0000, ElementType.e_ElementTypeDocumentFragment = 0x0001, ElementType.e_ElementTypePart = 0x0002, ElementType.e_ElementTypeArt = 0x0101,
  ElementType.e_ElementTypeSect = 0x0102, ElementType.e_ElementTypeDiv = 0x0100, ElementType.e_ElementTypeBlockQuote = 0x0103, ElementType.e_ElementTypeCaption = 0x0104,
  ElementType.e_ElementTypeTOC = 0x0105, ElementType.e_ElementTypeTOCI = 0x0106, ElementType.e_ElementTypeIndex = 0x0107, ElementType.e_ElementTypeAside = 0x0108,
  ElementType.e_ElementTypeTitle = 0x0109, ElementType.e_ElementTypeFENote = 0x010A, ElementType.e_ElementTypeNonStruct = 0x010F, ElementType.e_ElementTypePrivate = 0x0110,
  ElementType.e_ElementTypeParagraph = 0x0200, ElementType.e_ElementTypeHeading = 0x0201, ElementType.e_ElementTypeHeading1 = 0x0202, ElementType.e_ElementTypeHeading2 = 0x0203,
  ElementType.e_ElementTypeHeading3 = 0x0204, ElementType.e_ElementTypeHeading4 = 0x0205, ElementType.e_ElementTypeHeading5 = 0x0206, ElementType.e_ElementTypeHeading6 = 0x0207,
  ElementType.e_ElementTypeHeadingN = 0x0208, ElementType.e_ElementTypeList = 0x0209, ElementType.e_ElementTypeListItem = 0x020A, ElementType.e_ElementTypeListLabel = 0x020B,
  ElementType.e_ElementTypeListBody = 0x020C, ElementType.e_ElementTypeTable = 0x020D, ElementType.e_ElementTypeTableRow = 0x020E, ElementType.e_ElementTypeTableHeaderCell = 0x020F,
  ElementType.e_ElementTypeTableDataCell = 0x0210, ElementType.e_ElementTypeTableHeaderGroup = 0x0211, ElementType.e_ElementTypeTableBodyGroup = 0x0212, ElementType.e_ElementTypeTableFootGroup = 0x0213,
  ElementType.e_ElementTypeSpan = 0x0300, ElementType.e_ElementTypeQuote = 0x0301, ElementType.e_ElementTypeNote = 0x0302, ElementType.e_ElementTypeReference = 0x0303,
  ElementType.e_ElementTypeBibEntry = 0x0304, ElementType.e_ElementTypeCode = 0x0305, ElementType.e_ElementTypeLink = 0x0306, ElementType.e_ElementTypeAnnot = 0x0307,
  ElementType.e_ElementTypeRuby = 0x0308, ElementType.e_ElementTypeRubyBase = 0x0309, ElementType.e_ElementTypeRubyAnnot = 0x030A, ElementType.e_ElementTypeRubyPunc = 0x030B,
  ElementType.e_ElementTypeWarichu = 0x030C, ElementType.e_ElementTypeWarichuText = 0x030D, ElementType.e_ElementTypeWarichuPunc = 0x030E, ElementType.e_ElementTypeEm = 0x030F,
  ElementType.e_ElementTypeStrong = 0x0310, ElementType.e_ElementTypeSub = 0x0311, ElementType.e_ElementTypeFigure = 0x0400, ElementType.e_ElementTypeFormula = 0x0401,
  ElementType.e_ElementTypeForm = 0x0402, ElementType.e_ElementTypeArtifact = 0x1000, ElementType.e_ElementTypeTextObject = 0x80000001, ElementType.e_ElementTypePathObject = 0x80000002,
  ElementType.e_ElementTypeImageObject = 0x80000003, ElementType.e_ElementTypeShadingObject = 0x80000004, ElementType.e_ElementTypeFormObject = 0x80000005, ElementType.e_ElementTypeContainerObject = 0x8000000C,
  ElementType.e_ElementTypeAnnotObject = 0x8000000E, ElementType.e_ElementTypePageObject = 0x8000000F, ElementType.e_ElementTypeTextContent = 0xC0000001, ElementType.e_ElementTypePathContent = 0xC0000002,
  ElementType.e_ElementTypeImageContent = 0xC0000003, ElementType.e_ElementTypeShadingContent = 0xC0000004, ElementType.e_ElementTypeComplexContent = 0xC000000D, ElementType.e_ElementTypeAnnotContent = 0xC000000E
}
 Enumeration for standard structure types.
More...
 

Public Member Functions

 LRElement ()
 Constructor.

 
 LRElement (LRElement other)
 Constructor, with another base element object.
More...
 
LRElement.ElementType GetElementType ()
 Get element type.
More...
 
bool IsContentElement ()
 Check whether current object is content element or not.
More...
 
bool IsEmpty ()
 Check whether current object is empty or not.
More...
 
bool IsGraphicsObjectElement ()
 Check whether current object is graphics object element or not.
More...
 
bool IsStructureElement ()
 Check whether current object is structure element or not.
More...
 
string StringifyType ()
 Convert type (enum value) of current element to a short and memorable string (text) representation.
More...
 

Static Public Member Functions

static string StringifyElementType (LRElement.ElementType type)
 Convert enum value of a specified element type to a short and memorable string (text) representation.
More...
 

Detailed Description

This class represents base layout recognition element.

Member Enumeration Documentation

◆ ElementType

Enumeration for standard structure types.

Values of this enumeration should be used alone. Please refer to description of "Standard Structure Types" in Section 10.7.3 of <PDF Reference 1.7> and in description of "Standard structure types" in Section 14.8.4 of <PDF Reference 2.0> for more details.

Enumerator
e_ElementTypeDocument 

Structure element type: Document, which represents a complete document.

e_ElementTypeDocumentFragment 

Structure element type: DocumentFragment (PDF 2.0), which represents a part of an original complete document.

e_ElementTypePart 

Structure element type: Part, which represents a large-scale division of a document.

e_ElementTypeArt 

Structure element type: Art, which means "Article" and represents a relatively self-contained body of text constituting a single narrative or exposition.

e_ElementTypeSect 

Structure element type: Sect, which means "Section" and represents a container for grouping related content elements.

e_ElementTypeDiv 

Structure element type: Div, which means "Division" and represents a generic block-level element or group of elements.

e_ElementTypeBlockQuote 

Structure element type: BlockQuote, which means "Block quotation" and represents a portion of text consisting of one or more paragraphs attributed to someone other than the author of the surrounding text.

e_ElementTypeCaption 

Structure element type: Caption, which represents a brief portion of text describing a table or figure.

e_ElementTypeTOC 

Structure element type: TOC, which means "Table of contents" and represetns a list made up of table of contents item entries and/or other nested table of contents entries.

e_ElementTypeTOCI 

Structure element type: TOCI, which means "Table of contents item" and represents an individual member of a table of contents.

e_ElementTypeIndex 

Structure element type: Index, which represents a sequence of entries containing identifying text accompanied by reference elements that point out occurrences of the specified text in the main body of a document.

e_ElementTypeAside 

Structure element type: Aside (PDF 2.0), which represents content that is distinct from other content within its parent structure element.

e_ElementTypeTitle 

Structure element type: Title (PDF 2.0), which represents content that is usually referred to as the title of a document or high-level devision of content.

e_ElementTypeFENote 

Structure element type: FENote (PDF 2.0), which is used to markup footnotes and endnotes.

e_ElementTypeNonStruct 

Structure element type: NonStruct, which means "Nonstructural element" and represents a grouping element having no inherent structural significance; it serves solely for grouping purposes.

e_ElementTypePrivate 

Structure element type: Private, which means "Private element" and represents a grouping element containing private content belonging to the application producing it.

e_ElementTypeParagraph 

Structure element type: P, which means "Paragraph" and represents a low-level division of text.

e_ElementTypeHeading 

Structure element type: H, which means "Heading" and represnets a label for a subdivision of a document's content. It should be the first child of the division that it heads.

e_ElementTypeHeading1 

Structure element type: H1, which represents heading with level 1.

e_ElementTypeHeading2 

Structure element type: H2, which represents heading with level 2.

e_ElementTypeHeading3 

Structure element type: H3, which represents heading with level 3.

e_ElementTypeHeading4 

Structure element type: H4, which represents heading with level 4.

e_ElementTypeHeading5 

Structure element type: H5, which represents heading with level 5.

e_ElementTypeHeading6 

Structure element type: H6, which represents heading with level 6.

e_ElementTypeHeadingN 

Structure element type: Hn (PDF 2.0), which represents heading with level 7 or more.

e_ElementTypeList 

Structure element type: L, which means "List" and represents a sequence of items of like meaning and importance.

e_ElementTypeListItem 

Structure element type: LI, which means "List item" and represents an individual member of a list.

e_ElementTypeListLabel 

Structure element type: Lbl, which means "Label" and represents a name or number that distinguishes a given item from others in the same list or other group of like items.

e_ElementTypeListBody 

Structure element type: LBody, which means "List body" and reprsents the descriptive content of a list item.

e_ElementTypeTable 

Structure element type: Table, which represents a two-dimensional layout of rectangular data cells, possibly having a complex substructure.

e_ElementTypeTableRow 

Structure element type: TR, which means "Table row" and represents a row of headings or data in a table.

e_ElementTypeTableHeaderCell 

Structure element type: TH, which means "Table header cell" and represents a table cell containing header text describing one or more rows or columns of the table.

e_ElementTypeTableDataCell 

Structure element type: TD, which means "Table data cell" and represents a table cell containing data that is part of the table's content.

e_ElementTypeTableHeaderGroup 

Structure element type: THead, which means "Table header row group" and represents a group of rows that constitute the header of a table.

e_ElementTypeTableBodyGroup 

Structure element type: TBody, which means "Table body row group" and represents a group of rows that constitute the main body portion of a table.

e_ElementTypeTableFootGroup 

Structure element type: TFoot, which means "Table footer row group" and represents a group of rows that constitute the footer of a table.

e_ElementTypeSpan 

Structure element type: Span, which represents a generic inline portion of text having no particular inherent characteristics.

e_ElementTypeQuote 

Structure element type: Quote, which means "Quotation" and represents an inline portion of text attributed to someone other than the author of the surrounding text.

e_ElementTypeNote 

Structure element type: Note, which represents an item of explanatory text, such as a footnote or an endnote, that is referred to from within the body of the document.

e_ElementTypeReference 

Structure element type: Reference, which represents a citation to content elsewhere in the document.

e_ElementTypeBibEntry 

Structure element type: BibEntry, which means "Bibliography entry" and represents a reference identifying the external source of some cited content.

e_ElementTypeCode 

Structure element type: Code, which represents a fragment of computer program text.

e_ElementTypeLink 

Structure element type: Link, which represents an association between a portion of the ILSE's content and a corresponding link annotation or annotations.

e_ElementTypeAnnot 

Structure element type: Annot, which means "Annotation" and represents an association between a portion of the ILSE's content and a corresponding PDF annotation.

e_ElementTypeRuby 

Structure element type: Ruby, which represents the wrapper around the entire ruby assembly.

e_ElementTypeRubyBase 

Structure element type: RB, which means "Ruby base text" and represents the full-size text to which the ruby annotation is applied.

e_ElementTypeRubyAnnot 

Structure element type: RT, which means "Ruby annotation text" and represents the smaller-size text that is placed adjacent to the ruby base text.

e_ElementTypeRubyPunc 

Structure element type: RP, which means "Ruby punctuation" and represents punctuation surrounding the ruby annotation text.

e_ElementTypeWarichu 

Structure element type: Warichu, which represents the wrapper around the entire warichu assembly.

e_ElementTypeWarichuText 

Structure element type: WT, which means "Warichu text" and represents the smaller-size text of a warichu comment that is formatted into two lines and placed between surrounding WP elements.

e_ElementTypeWarichuPunc 

Structure element type: WP, which means "Warichu punctuation" and represents the punctuation that surrounds the WT text.

e_ElementTypeEm 

Structure element type: Em (PDF 2.0), which means "Emphasis" and represents content for the purpose of emphasis.

e_ElementTypeStrong 

Structure element type: Strong (PDF 2.0), which represents content for the purpose of strong importance, seriousness or urgency for its contents.

e_ElementTypeSub 

Structure element type: Sub (PDF 2.0), which means "Sub-division of a block level element" and represents content typically perceived as a sub-division inside a block level structure element.

e_ElementTypeFigure 

Structure element type: Figure, which represents an item of graphical content.

e_ElementTypeFormula 

Structure element type: Formula, which represents a mathematical formula.

e_ElementTypeForm 

Structure element type: Form, which represents a widget annotation representing an interactive form field.

e_ElementTypeArtifact 

Structure element type: Artifact, which includes other Pagination, Layout, Page and Background artifacts.

e_ElementTypeTextObject 

Structure element type: TextObject, which means text graphics object element.

e_ElementTypePathObject 

Structure element type: PathObject, which means path graphics object element.

e_ElementTypeImageObject 

Structure element type: ImageObject, which means image graphics object element.

e_ElementTypeShadingObject 

Structure element type: ShadingObject, which means shading graphics object element.

e_ElementTypeFormObject 

Structure element type: FormObject, which means form XObject graphics object element.

e_ElementTypeContainerObject 

Structure element type: ContainerObject, which means container object element.

e_ElementTypeAnnotObject 

Structure element type: AnnotObject, which means annotation object element.

e_ElementTypePageObject 

Structure element type: PageObject, which means page object element.

e_ElementTypeTextContent 

Structure element type: TextContent, which means text content element.

e_ElementTypePathContent 

Structure element type: PathContent, which means path content element.

e_ElementTypeImageContent 

Structure element type: ImageContent, which means image content element.

e_ElementTypeShadingContent 

Structure element type: ShadingContent, which means shading content element.

e_ElementTypeComplexContent 

Structure element type: ComplexContent, which means complex content element.

e_ElementTypeAnnotContent 

Structure element type: AnnotContent, which means annotation content element.

Constructor & Destructor Documentation

◆ LRElement()

foxit.addon.layoutrecognition.LRElement.LRElement ( LRElement  other)
inline

Constructor, with another base element object.

Parameters
[in]otherAnother base element object.

Member Function Documentation

◆ GetElementType()

LRElement.ElementType foxit.addon.layoutrecognition.LRElement.GetElementType ( )
inline

Get element type.

Returns
Element type. Please refer to values starting from foxit.addon.layoutrecognition.LRElement.ElementType.e_ElementTypeDocument and this would be one of these values.

◆ IsContentElement()

bool foxit.addon.layoutrecognition.LRElement.IsContentElement ( )
inline

Check whether current object is content element or not.

Returns
true means current object is content element, while false means current object is not content element.

◆ IsEmpty()

bool foxit.addon.layoutrecognition.LRElement.IsEmpty ( )
inline

Check whether current object is empty or not.

When the current object is empty, that means current object is useless.

Returns
true means current object is empty, while false means not.

◆ IsGraphicsObjectElement()

bool foxit.addon.layoutrecognition.LRElement.IsGraphicsObjectElement ( )
inline

Check whether current object is graphics object element or not.

Returns
true means current object is graphics object element, while false means current object is not graphics object element.

◆ IsStructureElement()

bool foxit.addon.layoutrecognition.LRElement.IsStructureElement ( )
inline

Check whether current object is structure element or not.

Returns
true means current object is structure element, while false means current object is not structure element,

◆ StringifyElementType()

static string foxit.addon.layoutrecognition.LRElement.StringifyElementType ( LRElement.ElementType  type)
inlinestatic

Convert enum value of a specified element type to a short and memorable string (text) representation.

Parameters
[in]typeA specified element type. Please refer to values starting from foxit.addon.layoutrecognition.LRElement.ElementType.e_ElementTypeDocument and this should be one of these values.
Returns
A string that represents the short and memorable string representation for specified type. If there is no short and memorable string representation or input type is an invalid enum value, this function would return an empty string.

◆ StringifyType()

string foxit.addon.layoutrecognition.LRElement.StringifyType ( )
inline

Convert type (enum value) of current element to a short and memorable string (text) representation.

Returns
A short and memorable string that represents type of current element. If there is no short and memorable string, this function would return an empty string.