com.itextpdf.text.pdf.mc
Class StructureObject

java.lang.Object
  extended by com.itextpdf.text.pdf.mc.StructureItem
      extended by com.itextpdf.text.pdf.mc.StructureObject

public class StructureObject
extends StructureItem

A StructureItem that refers to an object from an OBJR dictionary.


Field Summary
protected  PdfObject obj
          An object referred to by an OBJR dictionary.
protected  PdfIndirectReference objref
          The reference to the object.
protected  PdfIndirectReference ref
          The reference of the structure element of which the properties are stored.
protected  PdfDictionary structElem
          The structure element of which the properties are stored.
protected  int structParent
          The StructParent value of the object.
 
Fields inherited from class com.itextpdf.text.pdf.mc.StructureItem
pageref
 
Constructor Summary
StructureObject(PdfDictionary structElem, PdfIndirectReference ref, PdfDictionary dict)
          Creates a StructureObject for an OBJR dictionary.
 
Method Summary
 int checkStructParent(int pg, int sp)
          Checks if a StructParent corresponds with the StructParent stored in the object.
 PdfDictionary getObjAsDict()
          Returns the object referred to by the OBJR dictionary.
 PdfIndirectReference getObjRef()
          Returns the reference to the object.
 PdfIndirectReference getRef()
          Returns the structure element's reference.
 PdfDictionary getStructElem()
          Returns the structure element.
 String toString()
          Creates a String representation of the object.
 
Methods inherited from class com.itextpdf.text.pdf.mc.StructureItem
checkMCID, getPageref
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

structElem

protected PdfDictionary structElem
The structure element of which the properties are stored.


ref

protected PdfIndirectReference ref
The reference of the structure element of which the properties are stored.


obj

protected PdfObject obj
An object referred to by an OBJR dictionary.


objref

protected PdfIndirectReference objref
The reference to the object.


structParent

protected int structParent
The StructParent value of the object.

Constructor Detail

StructureObject

public StructureObject(PdfDictionary structElem,
                       PdfIndirectReference ref,
                       PdfDictionary dict)
Creates a StructureObject for an OBJR dictionary.

Parameters:
structElem - the parent structure element
ref - the reference of the parent structure element
dict - the object reference dictionary
Method Detail

getStructElem

public PdfDictionary getStructElem()
Returns the structure element.

Returns:
a StructElem dictionary

getRef

public PdfIndirectReference getRef()
Returns the structure element's reference.

Returns:
an indirect reference to a StructElem dictionary

getObjAsDict

public PdfDictionary 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

public PdfIndirectReference 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 class StructureItem
Parameters:
pg - the page reference that needs to be checked
sp - the structParent that needs to be checked
Returns:
1 in case the StructParent matches, -1 in case there's no match.

toString

public String toString()
Creates a String representation of the object.

Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2015. All Rights Reserved.