Class Bookmark
- java.lang.Object
- 
- com.ironsoftware.ironpdf.bookmark.Bookmark
 
- 
 public class Bookmark extends Object Represents a PDF bookmark as seen in the sidebar of PDF reader software to help users navigate.Bookmarks are arranged and navigated in a parent/child node hierarchy, similar to an HTML DOM. 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description BookmarkAddChildBookmark(String text, int pageIndex)Add a new bookmark as a first child of this bookmark.voidaddNextBookmark(String text, int pageIndex)Add a new bookmark after this bookmarkvoidAddPreviousBookmark(String text, int pageIndex)Add a new bookmark before this bookmarkBookmarkManagergetBookmarkManager()Gets bookmark manager.BookmarkDestinationsgetDestinationType()Gets destination type.StringgetNextBookmarkText()Gets next bookmark text.intgetPageIndex()Gets page index.StringgetParentBookmarkText()Gets parent bookmark text.StringgetPreviousBookmarkText()Gets previous bookmark text.StringgetText()Gets text.voidsetText(String value)Sets text.
 
- 
- 
- 
Constructor Detail- 
Bookmarkpublic Bookmark(@Nonnull String text, int pageIndex, @Nullable String parentBookmarkText, BookmarkDestinations destinationType, @Nullable String nextBookmarkText, @Nullable String previousBookmarkText)Instantiates a new Bookmark.- Parameters:
- text- the display text of the bookmark
- pageIndex- the zero based page number that the bookmark links to.
- parentBookmarkText- the text of parent bookmark which contains this bookmark. Null if it is root bookmark.
- destinationType- the type of destination represented by the bookmark
- nextBookmarkText- the text of next bookmark at the current level, if any. Null if it is last bookmark.
- previousBookmarkText- the previous bookmark at the current level, if any. Null if it is first bookmark.
 
 
- 
 - 
Method Detail- 
getDestinationTypepublic final BookmarkDestinations getDestinationType() Gets destination type. Type of destination represented by the bookmark.- Returns:
- the destination type
 
 - 
getNextBookmarkTextpublic final String getNextBookmarkText() Gets next bookmark text. The text of next bookmark at the current level, if any. Null if it is last bookmark.- Returns:
- the next bookmark text
 
 - 
getPageIndexpublic final int getPageIndex() Gets page index. The zero based page number that the bookmark links to.- Returns:
- the page index
 
 - 
getBookmarkManagerpublic final BookmarkManager getBookmarkManager() Gets bookmark manager.BookmarkManager- Returns:
- the bookmark manager
 
 - 
addNextBookmarkpublic final void addNextBookmark(String text, int pageIndex) Add a new bookmark after this bookmark- Parameters:
- text- the display text of the bookmark
- pageIndex- the zero based page number that the bookmark links to.
 
 - 
getParentBookmarkTextpublic final String getParentBookmarkText() Gets parent bookmark text. The text of parent bookmark which contains this bookmark. Null if it is root bookmark.- Returns:
- the parent bookmark text
 
 - 
getTextpublic final String getText() Gets text. The display text of the bookmark.- Returns:
- the text
 
 - 
setTextpublic final void setText(String value) Sets text. The display text of the bookmark- Parameters:
- value- the value
 
 - 
AddPreviousBookmarkpublic final void AddPreviousBookmark(String text, int pageIndex) Add a new bookmark before this bookmark- Parameters:
- text- the display text of the bookmark
- pageIndex- the zero based page number that the bookmark links to.
 
 - 
getPreviousBookmarkTextpublic final String getPreviousBookmarkText() Gets previous bookmark text. Previous bookmark at the current level, if any. Null if it is first bookmark.- Returns:
- the previous bookmark text.
 
 - 
AddChildBookmarkpublic final Bookmark AddChildBookmark(String text, int pageIndex) Add a new bookmark as a first child of this bookmark.To add a bookmark as a second child, please navigate to the childBookmark object and call AddNextBookmark. - Parameters:
- text- the display text of the bookmark
- pageIndex- the zero based page number that the bookmark links to.
- Returns:
- a new child bookmark
 
 
- 
 
-