// CHAPTER 6. Bookmarks /** Starts the bookmark retrieval process for a given PDF. */ function startGetBookmarkInfo(pdf) /** Gets the number of bookmarks for the PDF given to startGetBookmarkInfo. */ function numberBookmarks() /** Gets the bookmark level for the given bookmark (0...(n - 1)). */ function getBookmarkLevel(n) /** Gets the bookmark target page for the given PDF (which must be the same as the PDF passed to startSetBookmarkInfo) and bookmark (0...(n - 1)). */ function getBookmarkPage(pdf, n) /** Returns the text of bookmark (0...(n - 1)). */ function getBookmarkText(n) /** True if the bookmark is open. */ function getBookmarkOpenStatus(n) /** Ends the bookmark retrieval process, cleaning up. */ function endGetBookmarkInfo() /** Starts the bookmark setting process for n bookmarks. */ function startSetBookmarkInfo(n) /** Set bookmark level for the given bookmark (0...(n - 1)). */ function setBookmarkLevel(a, b) /** Sets the bookmark target page for the given PDF (which must be the same as the PDF to be passed to endSetBookmarkInfo) and bookmark (0...(n - 1)). */ function setBookmarkPage(pdf, a, b) /** Sets the open status of bookmark (0...(n - 1)). */ function setBookmarkOpenStatus(a, b) /** Sets the text of bookmark (0...(n - 1)). */ function setBookmarkText(n, t) /** Ends the bookmark setting process, writing the bookmarks to the given PDF. */ function endSetBookmarkInfo(pdf) /** Returns the bookmark data in JSON format. */ function getBookmarksJSON(pdf) /** Sets the bookmarks from JSON bookmark data. */ function setBookmarksJSON(pdf, data) /** Typesets a table of contents from existing bookmarks and prepends it to the document. If bookmark is set, the table of contents gets its own bookmark. */ function tableOfContents(pdf, font, fontsize, title, bookmark)