Class PdfStructureElement
java.lang.Object
com.itextpdf.text.pdf.PdfObject
com.itextpdf.text.pdf.PdfDictionary
com.itextpdf.text.pdf.PdfStructureElement
- All Implemented Interfaces:
IPdfStructureElement, Serializable
This is a node in a document logical structure. It may contain a mark point or it may contain
other nodes.
- Author:
- Paulo Soares
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPdfStructureElement(PdfDictionary parent, PdfName structureType, AccessibleElementId elementId) PdfStructureElement(PdfStructureElement parent, PdfName structureType) Creates a new instance of PdfStructureElement.PdfStructureElement(PdfStructureTreeRoot root, PdfName structureType) Creates a new instance of PdfStructureElement. -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(PdfName name) Gets the first entarance of attribute.protected AccessibleElementIdGets the parent of this node.getParent(boolean includeStructTreeRoot) Gets the reference this object will be written to.voidsetAttribute(PdfName name, PdfObject obj) Sets the attribute value.protected voidprotected voidvoidtoPdf(PdfWriter writer, OutputStream os) Writes the PDF representation of thisPdfDictionaryas an array ofbyteto the givenOutputStream.voidwriteAttributes(IAccessibleElement element) Methods inherited from class PdfDictionary
checkType, clear, contains, get, getAsArray, getAsBoolean, getAsDict, getAsIndirectObject, getAsName, getAsNumber, getAsStream, getAsString, getDirectObject, getKeys, isCatalog, isFont, isOutlineTree, isPage, isPages, merge, mergeDifferent, put, putAll, putEx, remove, size, toStringMethods inherited from class PdfObject
canBeInObjStm, getBytes, getIndRef, isArray, isBoolean, isDictionary, isIndirect, isName, isNull, isNumber, isStream, isString, length, setContent, setIndRef, type
-
Constructor Details
-
PdfStructureElement
Creates a new instance of PdfStructureElement.- Parameters:
parent- the parent of this nodestructureType- the type of structure. It may be a standard type or a user type mapped by the role map
-
PdfStructureElement
Creates a new instance of PdfStructureElement.- Parameters:
root- the parent of this nodestructureType- the type of structure. It may be a standard type or a user type mapped by the role map
-
PdfStructureElement
protected PdfStructureElement(PdfDictionary parent, PdfName structureType, AccessibleElementId elementId)
-
-
Method Details
-
getStructureType
-
getParent
-
getParent
-
getReference
Gets the reference this object will be written to.- Returns:
- the reference this object will be written to
- Since:
- 2.1.6 method removed in 2.1.5, but restored in 2.1.6
-
getAttribute
Gets the first entarance of attribute.- Specified by:
getAttributein interfaceIPdfStructureElement- Since:
- 5.3.4
-
setAttribute
Sets the attribute value.- Specified by:
setAttributein interfaceIPdfStructureElement- Since:
- 5.3.4
-
writeAttributes
-
toPdf
Description copied from class:PdfDictionaryWrites the PDF representation of thisPdfDictionaryas an array ofbyteto the givenOutputStream.- Overrides:
toPdfin classPdfDictionary- Parameters:
writer- for backwards compatibilityos- theOutputStreamto write the bytes to.- Throws:
IOException
-
setStructureTreeRoot
-
setStructureElementParent
-
getElementId
-