Package com.itextpdf.kernel.pdf.tagging
Class PdfStructIdTree
- java.lang.Object
-
- com.itextpdf.kernel.pdf.GenericNameTree
-
- com.itextpdf.kernel.pdf.tagging.PdfStructIdTree
-
- All Implemented Interfaces:
IPdfNameTreeAccess
public class PdfStructIdTree extends GenericNameTree
Models the tree of structure element IDs. This is an optional feature of tagged PDF documents.
-
-
Constructor Summary
Constructors Constructor Description PdfStructIdTree(PdfDocument pdfDoc)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addEntry(PdfString key, PdfObject value)
Add an entry to the name tree.PdfStructElem
getStructElemById(byte[] id)
Retrieve a structure element by ID, if it has one.PdfStructElem
getStructElemById(PdfString id)
Retrieve a structure element by ID, if it has one.(package private) static PdfStructIdTree
readFromDictionary(PdfDocument pdfDoc, PdfDictionary dict)
Parse a structure element ID tree into its in-memory representation.-
Methods inherited from class com.itextpdf.kernel.pdf.GenericNameTree
addEntry, addEntry, buildTree, getEntry, getEntry, getItems, getKeys, isModified, readTree, removeEntry, setItems, setModified
-
-
-
-
Constructor Detail
-
PdfStructIdTree
PdfStructIdTree(PdfDocument pdfDoc)
-
-
Method Detail
-
readFromDictionary
static PdfStructIdTree readFromDictionary(PdfDocument pdfDoc, PdfDictionary dict)
Parse a structure element ID tree into its in-memory representation.- Parameters:
pdfDoc
- the associatedPdfDocument
dict
- thePdfDictionary
from which to parse the tree- Returns:
- the parsed
PdfStructIdTree
-
getStructElemById
public PdfStructElem getStructElemById(PdfString id)
Retrieve a structure element by ID, if it has one.- Parameters:
id
- the ID of the structure element to retrieve- Returns:
- the structure element with the given ID if one exists, or null otherwise.
-
getStructElemById
public PdfStructElem getStructElemById(byte[] id)
Retrieve a structure element by ID, if it has one.- Parameters:
id
- the ID of the structure element to retrieve- Returns:
- the structure element with the given ID if one exists, or null otherwise.
-
addEntry
public void addEntry(PdfString key, PdfObject value)
Description copied from class:GenericNameTree
Add an entry to the name tree.- Overrides:
addEntry
in classGenericNameTree
- Parameters:
key
- key of the entryvalue
- object to add
-
-