public class PdfStructElem extends PdfObjectWrapper<PdfDictionary> implements IPdfStructElem
PdfObjectWrapper
the PdfObject
must be indirect.
Modifier and Type | Field and Description |
---|---|
static int |
BlockLevel |
static Set<PdfName> |
blockLevelRoles |
static int |
Grouping |
static Set<PdfName> |
groupingRoles |
static int |
Illustration |
static Set<PdfName> |
illustrationRoles |
static int |
InlineLevel |
static Set<PdfName> |
inlineLevelRoles |
protected int |
type |
static int |
Unknown |
Constructor and Description |
---|
PdfStructElem(PdfDictionary pdfObject) |
PdfStructElem(PdfDocument document, PdfName role) |
PdfStructElem(PdfDocument document, PdfName role, PdfAnnotation annot) |
PdfStructElem(PdfDocument document, PdfName role, PdfPage page) |
Modifier and Type | Method and Description |
---|---|
PdfMcr |
addKid(int index, PdfMcr kid) |
PdfStructElem |
addKid(int index, PdfStructElem kid) |
PdfMcr |
addKid(PdfMcr kid) |
PdfStructElem |
addKid(PdfStructElem kid) |
void |
flush() |
PdfString |
getActualText() |
PdfString |
getAlt() |
PdfObject |
getAttributes(boolean createNewIfNull)
Gets attributes object.
|
protected PdfDocument |
getDocument() |
PdfString |
getE() |
PdfObject |
getK() |
List<IPdfStructElem> |
getKids()
Gets list of the direct kids of structure element.
|
PdfString |
getLang() |
IPdfStructElem |
getParent() |
PdfName |
getRole() |
protected int |
getType() |
static int |
identifyType(PdfDocument doc, PdfName role) |
static boolean |
isStructElem(PdfDictionary dictionary)
Method to to distinguish struct elements from other elements of the logical tree (like mcr or struct tree root).
|
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the resultant document.
|
PdfStructElem |
put(PdfName key, PdfObject value) |
IPdfStructElem |
removeKid(int index) |
int |
removeKid(IPdfStructElem kid) |
void |
setActualText(PdfString actualText) |
void |
setAlt(PdfString alt) |
void |
setAttributes(PdfObject attributes) |
void |
setE(PdfString e) |
void |
setLang(PdfString lang) |
void |
setRole(PdfName role) |
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
public static int Unknown
public static int Grouping
public static int BlockLevel
public static int InlineLevel
public static int Illustration
protected int type
public PdfStructElem(PdfDictionary pdfObject)
pdfObject
- must be an indirect object.
public PdfStructElem(PdfDocument document, PdfName role, PdfPage page)
public PdfStructElem(PdfDocument document, PdfName role, PdfAnnotation annot)
public PdfStructElem(PdfDocument document, PdfName role)
public static boolean isStructElem(PdfDictionary dictionary)
public PdfObject getAttributes(boolean createNewIfNull)
createNewIfNull
- sometimes attributes object may not exist. Pass true
if you want to create empty dictionary in such case. The attributes dictionary will be stored inside element.
public void setAttributes(PdfObject attributes)
public PdfString getLang()
public void setLang(PdfString lang)
public PdfString getAlt()
public void setAlt(PdfString alt)
public PdfString getActualText()
public void setActualText(PdfString actualText)
public PdfString getE()
public void setE(PdfString e)
public PdfName getRole()
getRole
in interface IPdfStructElem
public void setRole(PdfName role)
public PdfStructElem addKid(PdfStructElem kid)
public PdfStructElem addKid(int index, PdfStructElem kid)
public IPdfStructElem removeKid(int index)
public int removeKid(IPdfStructElem kid)
public IPdfStructElem getParent()
getParent
in interface IPdfStructElem
public List<IPdfStructElem> getKids()
null
in the list on it's place.
getKids
in interface IPdfStructElem
public PdfObject getK()
public static int identifyType(PdfDocument doc, PdfName role)
public PdfStructElem put(PdfName key, PdfObject value)
public void flush()
flush
in class PdfObjectWrapper<PdfDictionary>
protected int getType()
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapper
isWrappedObjectMustBeIndirect
in class PdfObjectWrapper<PdfDictionary>
protected PdfDocument getDocument()
Copyright © 1998–2018 iText Group NV. All rights reserved.