public class PdfStructTreeRoot extends PdfObjectWrapper<PdfDictionary> implements IPdfStructElem
PdfObjectWrapper the PdfObject
must be indirect.| Constructor and Description |
|---|
PdfStructTreeRoot(PdfDictionary pdfObject) |
PdfStructTreeRoot(PdfDocument document) |
| Modifier and Type | Method and Description |
|---|---|
PdfStructElem |
addKid(int index,
PdfStructElem structElem) |
PdfStructElem |
addKid(PdfStructElem structElem) |
void |
copyTo(PdfDocument destDocument,
int insertBeforePage,
Map<PdfPage,PdfPage> page2page)
Copies structure to a
destDocument and insert it in a specified position in the document. |
void |
copyTo(PdfDocument destDocument,
Map<PdfPage,PdfPage> page2page)
Copies structure to a
destDocument. |
void |
createParentTreeEntryForPage(PdfPage page)
Creates and flushes parent tree entry for the page.
|
PdfMcr |
findMcrByMcid(PdfDictionary pageDict,
int mcid) |
PdfObjRef |
findObjRefByStructParentIndex(PdfDictionary pageDict,
int structParentIndex) |
void |
flush() |
PdfDocument |
getDocument() |
List<IPdfStructElem> |
getKids()
Gets list of the direct kids of StructTreeRoot.
|
PdfArray |
getKidsObject() |
int |
getNextMcidForPage(PdfPage page) |
Collection<PdfMcr> |
getPageMarkedContentReferences(PdfPage page)
Gets an unmodifiable collection of marked content references on page.
|
IPdfStructElem |
getParent() |
int |
getParentTreeNextKey() |
PdfName |
getRole() |
PdfDictionary |
getRoleMap() |
protected boolean |
isWrappedObjectMustBeIndirect()
Defines if the object behind this wrapper must be an indirect object in the
resultant document.
|
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidReleasepublic PdfStructTreeRoot(PdfDocument document)
public PdfStructTreeRoot(PdfDictionary pdfObject)
pdfObject - must be an indirect object.public PdfStructElem addKid(PdfStructElem structElem)
public PdfStructElem addKid(int index, PdfStructElem structElem)
public IPdfStructElem getParent()
getParent in interface IPdfStructElempublic List<IPdfStructElem> getKids()
null in the list on it's place.getKids in interface IPdfStructElempublic PdfArray getKidsObject()
public PdfDictionary getRoleMap()
public void createParentTreeEntryForPage(PdfPage page)
page - PdfPage for which to create parent tree entry. Typically this page is flushed after this call.public Collection<PdfMcr> getPageMarkedContentReferences(PdfPage page)
public PdfMcr findMcrByMcid(PdfDictionary pageDict, int mcid)
public PdfObjRef findObjRefByStructParentIndex(PdfDictionary pageDict, int structParentIndex)
public PdfName getRole()
getRole in interface IPdfStructElempublic void flush()
flush in class PdfObjectWrapper<PdfDictionary>public void copyTo(PdfDocument destDocument, Map<PdfPage,PdfPage> page2page)
destDocument.
PdfStructTreeRoot that is read from the document opened in reading mode,
otherwise an exception is thrown.destDocument - document to copy structure to. Shall not be current document.page2page - association between original page and copied page.public void copyTo(PdfDocument destDocument, int insertBeforePage, Map<PdfPage,PdfPage> page2page)
destDocument and insert it in a specified position in the document.
PdfStructTreeRoot that is read from the document opened in reading mode,
otherwise an exception is thrown.destDocument - document to copy structure to.insertBeforePage - indicates where the structure to be inserted.page2page - association between original page and copied page.public int getParentTreeNextKey()
public int getNextMcidForPage(PdfPage page)
public PdfDocument getDocument()
protected boolean isWrappedObjectMustBeIndirect()
PdfObjectWrapperisWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>Copyright © 1998–2017 iText Group NV. All rights reserved.