|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.icepdf.core.pobjects.Dictionary
org.icepdf.core.pobjects.PageTree
public class PageTree
This class represents a document's page tree which defines the ordering of pages in the document. The tree structure allows a user to quickly open a document containing thousands of pages. The tree contains nodes of two types, page tree nodes and page nodes, where page tree nodes are intermediate nodes and pages are leaves. A simple example of this tree structure is a single page tree node that references all of the document's page objects directly.
The page tree is accessible via the document catalog and can be traversed to display a desired page or extracts its content.
Page,
Catalog| Field Summary | |
|---|---|
static Name |
COUNT_KEY
|
static Name |
CROPBOX_KEY
|
protected boolean |
isRotationFactor
Indicates that the PageTree has a rotation factor which should be respected. |
static Name |
KIDS_KEY
|
static Name |
MEDIABOX_KEY
|
static Name |
PARENT_KEY
|
static Name |
RESOURCES_KEY
|
static Name |
ROTATE_KEY
|
protected float |
rotationFactor
Inheritable rotation factor by child pages. |
static Name |
TYPE
|
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, FORM_TYPE_KEY, isDeleted, isNew, LENGTH_KEY, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
PageTree(Library l,
java.util.HashMap h)
Creates a new instance of a PageTree. |
|
| Method Summary | |
|---|---|
PRectangle |
getCropBox()
Gets the crop box boundary defined by this page tree. |
PRectangle |
getMediaBox()
Gets the media box boundary defined by this page tree. |
int |
getNumberOfPages()
In a PDF file there is a root Pages object, which contains children Page objects, as well as children PageTree objects, all arranged in a tree. |
Page |
getPage(int pageNumber)
Gets a Page from the PDF file, locks it for the user, initializes the Page, and returns it. |
int |
getPageNumber(Reference r)
Gets the page number of the page specifed by a reference. |
Reference |
getPageReference(int pageNumber)
Get the page reference for the specified page number. |
PageTree |
getParent()
Gets the page tree node that is the immediate parent of this one. |
Resources |
getResources()
Gets the Resources defined by this PageTree. |
void |
init()
Initiate the PageTree. |
void |
resetInitializedState()
Reset the pages initialized flag and as a result subsequent calls to this PageTree may trigger a call to init(). |
java.lang.String |
toString()
Returns a summary of the PageTree dictionary values. |
| Methods inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
getEntries, getFloat, getInt, getLibrary, getNumber, getObject, getPObjectReference, isDeleted, isNew, setDeleted, setNew, setPObjectReference |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final Name TYPE
public static final Name PARENT_KEY
public static final Name COUNT_KEY
public static final Name MEDIABOX_KEY
public static final Name CROPBOX_KEY
public static final Name KIDS_KEY
public static final Name ROTATE_KEY
public static final Name RESOURCES_KEY
protected float rotationFactor
protected boolean isRotationFactor
| Constructor Detail |
|---|
public PageTree(Library l,
java.util.HashMap h)
l - document library.h - PageTree dictionary entries.| Method Detail |
|---|
public void resetInitializedState()
public void init()
init in class Dictionarypublic PRectangle getMediaBox()
public PRectangle getCropBox()
public Resources getResources()
public PageTree getParent()
public int getPageNumber(Reference r)
r - reference to a page in the page tree.
public int getNumberOfPages()
public Page getPage(int pageNumber)
getPage must be matched with
corresponding calls to releasePage.
Calls cannot be nested, meaning that releasePage
must be called before a subsequent invocation of
getPage for the same pageIndex.
pageNumber - Zero-based index of the Page to return.
public Reference getPageReference(int pageNumber)
pageNumber - zero-based indox of page to find reference of.
public java.lang.String toString()
toString in class Dictionary
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||