|
|||||||||
| 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 | |
|---|---|
protected boolean |
isRotationFactor
Indicates that the PageTree has a rotation factor which should be respected. |
protected float |
rotationFactor
Inheritable rotation factor by child pages. |
| Fields inherited from class org.icepdf.core.pobjects.Dictionary |
|---|
entries, isDeleted, isNew, library, SUBTYPE_KEY, TYPE_KEY |
| Constructor Summary | |
|---|---|
PageTree(Library l,
java.util.Hashtable h)
Creates a new instance of a PageTree. |
|
| Method Summary | |
|---|---|
protected void |
dispose(boolean cache)
Dispose the PageTree. |
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,
java.lang.Object user)
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 |
releasePage(int pageNumber,
java.lang.Object user)
Release the Page that was locked by getPage
for user. |
void |
releasePage(Page page,
java.lang.Object user)
Release the Page that was locked by getPage
for user. |
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, 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 |
|---|
protected float rotationFactor
protected boolean isRotationFactor
| Constructor Detail |
|---|
public PageTree(Library l,
java.util.Hashtable h)
l - document library.h - PageTree dictionary entries.| Method Detail |
|---|
protected void dispose(boolean cache)
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,
java.lang.Object user)
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.user - The object that is asking for the Page to be locked on its behalf.
releasePage(org.icepdf.core.pobjects.Page, java.lang.Object)public Reference getPageReference(int pageNumber)
pageNumber - zero-based indox of page to find reference of.
public void releasePage(Page page,
java.lang.Object user)
getPage
for user.
ICEpdf uses a caching and memory management mechanism
to reduce the CPU, I/O, and time to access a Page,
which requires a locking and releasing protocol.
Calls to the 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.
page - The Page that was lockeduser - The entity for whom the page was locked.getPage(int, java.lang.Object)
public void releasePage(int pageNumber,
java.lang.Object user)
getPage
for user.
ICEpdf uses a caching and memory management mechanism
to reduce the CPU, I/O, and time to access a Page,
which requires a locking and releasing protocol.
Calls to the 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 - The page number of the Page that was locked.user - The entity for whom the page was locked.getPage(int, java.lang.Object)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 | ||||||||