public class PdfPageTree
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected PdfCatalog |
_catalog
The catalog associated with this document.
|
protected static java.util.Set |
_inheritable
Defines the set of inheritable field attributes.
|
protected PdfManager |
_m
The manager associated with this document.
|
protected PdfReference |
_pageTreeRoot
The page tree root of the document.
|
protected static PdfName |
PDFNAME_COUNT |
protected static PdfName |
PDFNAME_KIDS |
protected static PdfName |
PDFNAME_PAGE |
protected static PdfName |
PDFNAME_PAGES |
protected static PdfName |
PDFNAME_PARENT |
protected static PdfName |
PDFNAME_TYPE |
Constructor and Description |
---|
PdfPageTree(PdfManager manager)
Constructs a
PdfPageTree instance based on a
specified PdfManager . |
Modifier and Type | Method and Description |
---|---|
int |
getNumberOfPages()
Returns the number of pages in the document.
|
PdfReference |
getPage(int pageNumber)
Returns an indirect reference to a page object specified by
page number.
|
PdfReference |
getRoot()
Returns an indirect reference to the root node of the
document's page tree.
|
PdfDictionary |
inheritAttributes(PdfDictionary page)
Adds inherited attributes to a specified page dictionary
object.
|
protected PdfReference _pageTreeRoot
protected PdfManager _m
protected PdfCatalog _catalog
protected static java.util.Set _inheritable
protected static final PdfName PDFNAME_COUNT
protected static final PdfName PDFNAME_KIDS
protected static final PdfName PDFNAME_PAGE
protected static final PdfName PDFNAME_PAGES
protected static final PdfName PDFNAME_PARENT
protected static final PdfName PDFNAME_TYPE
public PdfPageTree(PdfManager manager)
PdfPageTree
instance based on a
specified PdfManager
.public PdfReference getPage(int pageNumber) throws java.io.IOException, PdfFormatException
inheritAttributes(PdfDictionary)
should be used to obtain
inherited attributes.pageNumber
- the page number. The numbering starts
with 0
.java.io.IOException
PdfFormatException
public int getNumberOfPages() throws java.io.IOException, PdfFormatException
java.io.IOException
PdfFormatException
public PdfReference getRoot() throws java.io.IOException, PdfFormatException
java.io.IOException
PdfFormatException
public PdfDictionary inheritAttributes(PdfDictionary page) throws java.io.IOException, PdfFormatException
page
- the page dictionary to be filled in with
inherited attributes.java.io.IOException
PdfFormatException