Class BookmarkManager
java.lang.Object
com.ironsoftware.ironpdf.bookmark.BookmarkManager
Class used to add , edit and remove bookmarks from a 
PdfDocument outline.
 Bookmarks are arranged and navigated in a parent/child node hierarchy, similar to an HTML DOM.
 See: PdfDocument.getBookmark() 
 See: Bookmark 
- 
Constructor SummaryConstructorsConstructorDescriptionBookmarkManager(InternalPdfDocument internalPdfDocument) Please get BookmarkManager byPdfDocument.getBookmark()instead.
- 
Method SummaryModifier and TypeMethodDescriptionfinal voidaddBookMarkAtEnd(String text, int pageIndex) Add a new bookmark at the end of the bookmark collectionfinal voidaddBookMarkAtStart(String text, int pageIndex) Add a new bookmark at the start of the document collectionfinal BookmarkaddChildBookmark(String text, int pageIndex, String parentBookmarkText) Add a new bookmark as a first child of this bookmark.Retrieve all bookmarks within this PDF, recursively retrieve all children of bookmarks within this collection, and return as a flat listfinal intgetCount()Total number of bookmarks, including all nested bookmarksfinal voidinsertBookmark(Bookmark bookmark) Insert a new bookmarkfinal voidinsertBookmark(String text, int pageIndex, String parentText, String previousText) Insert a new bookmark
- 
Constructor Details- 
BookmarkManagerPlease get BookmarkManager byPdfDocument.getBookmark()instead.- Parameters:
- internalPdfDocument- the internal pdf document
 
 
- 
- 
Method Details- 
getCountpublic final int getCount()Total number of bookmarks, including all nested bookmarks- Returns:
- Bookmarks count
 
- 
getBookmarksRetrieve all bookmarks within this PDF, recursively retrieve all children of bookmarks within this collection, and return as a flat list- Returns:
- A flattened list of all bookmark ojects in this collection and all of their children
 
- 
addBookMarkAtEndAdd a new bookmark at the end of the bookmark collection- Parameters:
- text- The display text for the link.
- pageIndex- The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
 
- 
addBookMarkAtStartAdd a new bookmark at the start of the document collection- Parameters:
- text- The display text for the link.
- pageIndex- The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
 
- 
insertBookmarkpublic final void insertBookmark(String text, int pageIndex, String parentText, String previousText) Insert a new bookmark- Parameters:
- text- The display text for the link.
- pageIndex- The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
- parentText- parent bookmark text. set to null for insert at the top
- previousText- previous bookmark text. set to null for insert at first of its siblings
 
- 
insertBookmarkInsert a new bookmark- Parameters:
- bookmark- a bookmark object.
 
- 
addChildBookmarkAdd 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 for the link.
- pageIndex- The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
- parentBookmarkText- bookmark parent text, set empty if bookmark does not have parent.
- Returns:
- a new child bookmark
 
 
-