Package com.itextpdf.text.pdf.mc
Class StructureObject
java.lang.Object
com.itextpdf.text.pdf.mc.StructureItem
com.itextpdf.text.pdf.mc.StructureObject
A StructureItem that refers to an object from an OBJR dictionary.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected PdfObject
An object referred to by an OBJR dictionary.protected PdfIndirectReference
The reference to the object.protected PdfIndirectReference
The reference of the structure element of which the properties are stored.protected PdfDictionary
The structure element of which the properties are stored.protected int
The StructParent value of the object.Fields inherited from class com.itextpdf.text.pdf.mc.StructureItem
pageref
-
Constructor Summary
ConstructorsConstructorDescriptionStructureObject
(PdfDictionary structElem, PdfIndirectReference ref, PdfDictionary dict) Creates a StructureObject for an OBJR dictionary. -
Method Summary
Modifier and TypeMethodDescriptionint
checkStructParent
(int pg, int sp) Checks if a StructParent corresponds with the StructParent stored in the object.Returns the object referred to by the OBJR dictionary.Returns the reference to the object.getRef()
Returns the structure element's reference.Returns the structure element.toString()
Creates a String representation of the object.Methods inherited from class com.itextpdf.text.pdf.mc.StructureItem
checkMCID, getPageref
-
Field Details
-
structElem
The structure element of which the properties are stored. -
ref
The reference of the structure element of which the properties are stored. -
obj
An object referred to by an OBJR dictionary. -
objref
The reference to the object. -
structParent
protected int structParentThe StructParent value of the object.
-
-
Constructor Details
-
StructureObject
public StructureObject(PdfDictionary structElem, PdfIndirectReference ref, PdfDictionary dict) throws InvalidPdfException Creates a StructureObject for an OBJR dictionary.- Parameters:
structElem
- the parent structure elementref
- the reference of the parent structure elementdict
- the object reference dictionary- Throws:
InvalidPdfException
-
-
Method Details
-
getStructElem
Returns the structure element.- Returns:
- a StructElem dictionary
-
getRef
Returns the structure element's reference.- Returns:
- an indirect reference to a StructElem dictionary
-
getObjAsDict
Returns the object referred to by the OBJR dictionary. Note that this method returns a dictionary which means that in case the object is a stream, only the stream dictionary will be returned.- Returns:
- the object referred to by OBJR as a dictionary
-
getObjRef
Returns the reference to the object.- Returns:
- an object reference
-
checkStructParent
public int checkStructParent(int pg, int sp) Checks if a StructParent corresponds with the StructParent stored in the object.- Overrides:
checkStructParent
in classStructureItem
- Parameters:
pg
- the page reference that needs to be checkedsp
- the structParent that needs to be checked- Returns:
- 1 in case the StructParent matches, -1 in case there's no match.
-
toString
Creates a String representation of the object.
-