public abstract class Element extends Object
Represents a base class for element in logical structure.
Modifier and Type | Method and Description |
---|---|
Element |
appendChild(Element element)
Append
/Aspose.Pdf.LogicalStructure.Element to collection of children. |
Element |
appendChild(Element element,
boolean checkIfCanBeAppended)
Append
/Aspose.Pdf.LogicalStructure.Element to collection of children. |
void |
clearChilds()
Clear all childs.
|
<T extends Element> |
findElements(Class<T> typeOfTboolean)
Find Elements of a given type
|
<T extends Element> |
findElements(Class<T> typeOfT,
boolean recursiveSearch)
Find Elements of a given type
|
ElementList |
getChildElements()
Gets children collection of
Element objects. |
ElementPdfEngine |
getElementEngine()
Get parent element.
|
Element |
getParentElement()
Gets parent collection of
Element objects. |
ITaggedContent |
getTaggedContent() |
com.aspose.pdf.engine.data.ITrailerable |
getTrailer()
Internal method
|
Element |
insertChild(Element element,
int index)
Insert
/Aspose.Pdf.LogicalStructure.Element to collection of children at specified index. |
Element |
insertChild(Element element,
int index,
boolean checkIfCanBeInserted)
Insert
/Aspose.Pdf.LogicalStructure.Element to collection of children at specified index. |
void |
preSave() |
void |
removeChild(int index)
Remove child at.
|
void |
setParentElement(Element parentElement) |
abstract OBJRElement |
tag(Annotation annotation)
Bind a structure element to the Annotation.
|
abstract MCRElement |
tag(Artifact artifact)
Bind a structure element to the Artifact.
|
abstract MCRElement |
tag(BDC bdc)
Bind a structure element to the content stream BDC operator.
|
abstract OBJRElement |
tag(XForm form)
Bind a structure element to the content stream XForm.
|
abstract OBJRElement |
tag(XImage image)
Bind a structure element to the XImage.
|
String |
toString()
Returns a string that represents the current object.
|
public final com.aspose.pdf.engine.data.ITrailerable getTrailer()
public final ITaggedContent getTaggedContent()
public final ElementPdfEngine getElementEngine()
Get parent element.
public final Element getParentElement()
Gets parent collection of Element
objects.
Element
objects.public final ElementList getChildElements()
Gets children collection of Element
objects.
Element
objects.public <T extends Element> List<T> findElements(Class<T> typeOfTboolean)
Find Elements of a given type
T
- Type of Structure Element for search
T
: Type of Structure Element for search
typeOfTboolean
- class instancepublic <T extends Element> List<T> findElements(Class<T> typeOfT, boolean recursiveSearch)
Find Elements of a given type
T
- Type of Structure Element for search
T
: Type of Structure Element for search
T
: Type of Structure Element for search
typeOfT
- class instancerecursiveSearch
- (Optional) Recursive Search (default false, search only from direct children)public void preSave()
public void setParentElement(Element parentElement)
public final Element appendChild(Element element)
Append /Aspose.Pdf.LogicalStructure.Element
to collection of children.
element
- /Aspose.Pdf.LogicalStructure.Element
object to add./Aspose.Pdf.LogicalStructure.Element
which has been added.
throws TaggedExceptionpublic final Element appendChild(Element element, boolean checkIfCanBeAppended)
Append /Aspose.Pdf.LogicalStructure.Element
to collection of children.
element
- /Aspose.Pdf.LogicalStructure.Element
object to add.checkIfCanBeAppended
- Check if can be appended.
throws TaggedException/Aspose.Pdf.LogicalStructure.Element
which has been added.public final Element insertChild(Element element, int index)
Insert /Aspose.Pdf.LogicalStructure.Element
to collection of children at specified index.
element
- /Aspose.Pdf.LogicalStructure.Element
object to add.index
- Element index./Aspose.Pdf.LogicalStructure.Element
which has been added.
throws TaggedExceptionpublic final Element insertChild(Element element, int index, boolean checkIfCanBeInserted)
Insert /Aspose.Pdf.LogicalStructure.Element
to collection of children at specified index.
element
- /Aspose.Pdf.LogicalStructure.Element
object to add.index
- Element index.checkIfCanBeInserted
- boolean value/Aspose.Pdf.LogicalStructure.Element
which has been added.
throws TaggedExceptionpublic final void removeChild(int index)
Remove child at.
index
- Child element index.public final void clearChilds()
Clear all childs.
public abstract MCRElement tag(BDC bdc)
Bind a structure element to the content stream BDC operator.
bdc
- Content stream bdc operator./Aspose.Pdf.LogicalStructure.MCRElement
Structure element.public abstract OBJRElement tag(XForm form)
Bind a structure element to the content stream XForm.
form
- Pdf form./Aspose.Pdf.LogicalStructure.OBJRElement
Structure element.public abstract OBJRElement tag(XImage image)
Bind a structure element to the XImage.
image
- Pdf image./Aspose.Pdf.LogicalStructure.OBJRElement
Structure element.public abstract MCRElement tag(Artifact artifact)
Bind a structure element to the Artifact.
artifact
- Pdf artifact./Aspose.Pdf.LogicalStructure.MCRElement
Structure element.public abstract OBJRElement tag(Annotation annotation)
Bind a structure element to the Annotation.
annotation
- Pdf annotation./Aspose.Pdf.LogicalStructure.OBJRElement
Structure element.Copyright © 2025 Aspose. All Rights Reserved.