|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.snowtide.pdf.Bookmark
public class Bookmark
Instances of this class form a singly-rooted tree available in some PDF documents.
The elements in such a tree, available via the PDFTextStream.getBookmarks()
function,
refer to a page within the source PDF document. In addition, some Bookmarks may also refer to
a position on the referred page, further specifying the location of a section of interest within
the source PDF document.
Method Summary | |
---|---|
java.util.List |
getAllChildren()
Returns a new List of the direct descendants of this bookmark. |
int |
getAllChildren(java.util.List dest)
Adds all of the direct descendants of this bookmark to the given list. |
java.util.List |
getAllDescendants()
Performs a full descent of the bookmark tree rooted at this bookmark, adding all descendant child bookmarks to a new list, which is returned. |
int |
getAllDescendants(java.util.List dest)
Performs a full descent of the bookmark tree rooted at this bookmark, adding all descendant child bookmarks to the given list. |
float |
getBottomBound()
Returns the y-coordinate on the page to which this bookmark refers where a PDF viewer should position the bottom edge of its window when the bookmark is activated. |
Bookmark |
getChild(int n)
Returns the n-th child of this bookmark. |
int |
getChildCnt()
Returns the number of children this bookmark contains. |
java.lang.String |
getDestinationName()
Returns the name of the destination associated with this Bookmark . |
float |
getLeftBound()
Returns the x-coordinate on the page to which this bookmark refers where a PDF viewer should position the left edge of its window when the bookmark is activated. |
int |
getPageNumber()
Returns the page number for this bookmark. |
float |
getRightBound()
Returns the x-coordinate on the page to which this bookmark refers where a PDF viewer should position the right edge of its window when the bookmark is activated. |
java.lang.String |
getTitle()
Returns the title/label for this bookmark. |
float |
getTopBound()
Returns the y-coordinate on the page to which this bookmark refers where a PDF viewer should position the top edge of its window when the bookmark is activated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public java.lang.String getTitle()
public java.lang.String getDestinationName()
Bookmark
.
This value may be null if this Bookmark
is not associated with a named
destination.
public int getPageNumber()
PDFTextStream.getPage(int)
method.
This function may return -1 if no page number is specified for a bookmark;
this is very likely if this bookmark is the root of a PDF document's bookmark tree.
public float getLeftBound()
public float getRightBound()
public float getTopBound()
public float getBottomBound()
public int getChildCnt()
public Bookmark getChild(int n)
java.lang.IndexOutOfBoundsException
- - if n
is out of range (n < 0 || n >= getChildCnt()
).public int getAllChildren(java.util.List dest)
public java.util.List getAllChildren()
public int getAllDescendants(java.util.List dest)
public java.util.List getAllDescendants()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |