Class Bookmark_Api


  • public final class Bookmark_Api
    extends Object
    The type Bookmark api.
    • Constructor Detail

      • Bookmark_Api

        public Bookmark_Api()
    • Method Detail

      • getBookmarks

        public static List<Bookmark> getBookmarks​(InternalPdfDocument internalPdfDocument)
        Retrieve all bookmarks within this PDF, recursively retrieve all children of bookmarks within this collection, and return a flat list
        Parameters:
        internalPdfDocument - the internal pdf document
        Returns:
        A flattened list of all bookmarks in this collection and all of their children
      • insertBookmarkAsFirstChild

        public static void insertBookmarkAsFirstChild​(InternalPdfDocument internalPdfDocument,
                                                      int pageIndex,
                                                      String text,
                                                      String parentText)
        Insert a new bookmark
        Parameters:
        internalPdfDocument - the internal pdf document
        pageIndex - The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
        text - The display text for the link.
        parentText - parent bookmark text. set to null for insert at the top
      • insertBookmark

        public static void insertBookmark​(InternalPdfDocument internalPdfDocument,
                                          int pageIndex,
                                          String text,
                                          String parentText,
                                          String previousText)
        Insert a new bookmark
        Parameters:
        internalPdfDocument - the internal pdf document
        pageIndex - The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
        text - The display text for the link.
        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
      • insertBookmarkAtStart

        public static void insertBookmarkAtStart​(InternalPdfDocument internalPdfDocument,
                                                 int pageIndex,
                                                 String text)
        Insert a new bookmark
        Parameters:
        internalPdfDocument - the internal pdf document
        pageIndex - The zero based page number to link to. E.g. Page 1 has a PageIndex of 0
        text - The display text for the link.