FoxitPDFSDKforWeb v10.0.0
Foxit PDF SDK for Web
|
Provides functionality for management and manipulation of bookmark-related data. More...
Public Member Functions | |
addBookmark (options) | |
Creates a new bookmark with the specified options. More... | |
cutBookmark (bookmarkNodeId, parentBookmarkNodeId) | |
Mark a bookmark node as cut. More... | |
deleteBookmark (destBookmarkNodeId) | |
Deletes the bookmark with the specified bookmark node id. More... | |
Promise< BookmarkData[]> | getBookmarkChildren (bookmarkNodeId) |
Retrieves the children of a bookmark for the given bookmark node id. More... | |
getBookmarkData (bookmarkNodeId) | |
Retrieves the bookmark data for the given bookmark node id. More... | |
getDestination () | |
Retrieves the current position of the PDF pages in the viewport. More... | |
getFirstLevelBookmarks () | |
Retrieves the bookmarks at the first level of the bookmark hierarchy. More... | |
getParentBookmarkId (bookmarkNodeId) | |
Retrieves the parent bookmark node id for the given bookmark node id. More... | |
moveBookmark (srcBookmarkNodeId, srcParentBookmarkNodeId, destBookmarkNodeId, destParentBookmarkNodeId, relationship) | |
Moves the bookmark with the specified source node id to the specified destination. More... | |
void | onBookmarkAdded (callback) |
Registers a callback to be invoked when a bookmark is added. More... | |
onBookmarkChildrenReloaded (callback) | |
Registers a callback to be invoked when the children of a bookmark are reloaded. More... | |
void | onBookmarkDeleted (callback) |
Registers a callback to be invoked when a bookmark is deleted. More... | |
onBookmarkMoved (callback) | |
Registers a callback to be invoked when a bookmark is moved. More... | |
void | onBookmarkPropertiesUpdated (callback) |
Registers a callback to be invoked when bookmark properties are updated. More... | |
onPasteCutBookmark (callback) | |
Registers a callback to be invoked when pasting a cut bookmark. More... | |
Promise< void > | pasteCutBookmark (destBookmarkId, destParentBookmarkId, relationship) |
Move the cut bookmark node to the specified position according to the relationship. If there are no bookmarks to be cut, this method does nothing. More... | |
performAction (bookmarkNodeId) | |
Performs an action associated with the bookmark node id. More... | |
Promise< void > | reloadBookmarkChildren (parentBookmarkNodeId) |
Reloads the bookmark data for the given bookmark node id. More... | |
renameBookmark (bookmarkNodeId, newTitle) | |
Renames the bookmark with the specified node id to the new title. More... | |
setColor (bookmarkNodeId, newColor) | |
Updates the font color of the specified node id. More... | |
setDestination (bookmarkNodeId, newDestination) | |
Updates the destination for the bookmark with the specified node id. More... | |
setFontStyle (bookmarkNodeId, style) | |
Updates the font style of the specified node ID. More... | |
Provides functionality for management and manipulation of bookmark-related data.
BookmarkDataService::addBookmark | ( | options | ) |
Creates a new bookmark with the specified options.
options | AddBookmarkOptions - Options for creating the new bookmark. |
undefined
if not created successfully. BookmarkDataService::cutBookmark | ( | bookmarkNodeId | , |
parentBookmarkNodeId | |||
) |
Mark a bookmark node as cut.
bookmarkNodeId | number - The bookmark node id. |
parentBookmarkNodeId | number|undefined - The parent bookmark node id. |
BookmarkDataService::deleteBookmark | ( | destBookmarkNodeId | ) |
Deletes the bookmark with the specified bookmark node id.
destBookmarkNodeId | number - The bookmark node id to be deleted. |
Promise<BookmarkData[]> BookmarkDataService::getBookmarkChildren | ( | bookmarkNodeId | ) |
Retrieves the children of a bookmark for the given bookmark node id.
bookmarkNodeId | number|undefined - The parent bookmark node id, or undefined if need get the first level bookmark nodes. |
BookmarkDataService::getBookmarkData | ( | bookmarkNodeId | ) |
Retrieves the bookmark data for the given bookmark node id.
bookmarkNodeId | number - The bookmark node id. |
BookmarkDataService::getDestination | ( | ) |
Retrieves the current position of the PDF pages in the viewport.
BookmarkDataService::getFirstLevelBookmarks | ( | ) |
Retrieves the bookmarks at the first level of the bookmark hierarchy.
BookmarkDataService::getParentBookmarkId | ( | bookmarkNodeId | ) |
Retrieves the parent bookmark node id for the given bookmark node id.
bookmarkNodeId | number - The bookmark node id. |
BookmarkDataService::moveBookmark | ( | srcBookmarkNodeId | , |
srcParentBookmarkNodeId | , | ||
destBookmarkNodeId | , | ||
destParentBookmarkNodeId | , | ||
relationship | |||
) |
Moves the bookmark with the specified source node id to the specified destination.
srcBookmarkNodeId | number - The source bookmark node id. |
srcParentBookmarkNodeId | number|undefined - The source parent bookmark node id. |
destBookmarkNodeId | number|undefined - The destination bookmark node id. |
destParentBookmarkNodeId | number|undefined - The destination parent bookmark node id. |
relationship | BookmarkRelationship - The relationship between source and destination. |
void BookmarkDataService::onBookmarkAdded | ( | callback | ) |
Registers a callback to be invoked when a bookmark is added.
callback | (event:AddBookmarkEvent)=>void - A function that will be called when a AddBookmarkEvent occurs. |
BookmarkDataService::onBookmarkChildrenReloaded | ( | callback | ) |
Registers a callback to be invoked when the children of a bookmark are reloaded.
callback | (parentBookmarkNodeId: number|undefined, children: BookmarkData[])=>void - Callback function to handle bookmark children reload. |
void BookmarkDataService::onBookmarkDeleted | ( | callback | ) |
Registers a callback to be invoked when a bookmark is deleted.
callback | (event:DeleteBookmarkEvent)=>void - A function that will be called when a DeleteBookmarkEvent occurs. |
BookmarkDataService::onBookmarkMoved | ( | callback | ) |
Registers a callback to be invoked when a bookmark is moved.
callback | (event:MoveBookmarkEvent)=>void - A function that will be called when a MoveBookmarkEvent occurs. |
void BookmarkDataService::onBookmarkPropertiesUpdated | ( | callback | ) |
Registers a callback to be invoked when bookmark properties are updated.
callback | (event:UpdateBookmarkPropertiesEvent)=>void - A function that will be called when a UpdateBookmarkPropertiesEvent occurs. |
BookmarkDataService::onPasteCutBookmark | ( | callback | ) |
Registers a callback to be invoked when pasting a cut bookmark.
callback | (info:PasteCutBookmarkInfo)=>void - Callback function to handle when pasting a cut bookmark |
Promise<void> BookmarkDataService::pasteCutBookmark | ( | destBookmarkId | , |
destParentBookmarkId | , | ||
relationship | |||
) |
Move the cut bookmark node to the specified position according to the relationship. If there are no bookmarks to be cut, this method does nothing.
destBookmarkId | number - The destination bookmark node id. |
destParentBookmarkId | number|undefined - The parent id of the destination bookmark node. |
relationship | BookmarkRelationship - The relationship between source and destination. |
BookmarkDataService::performAction | ( | bookmarkNodeId | ) |
Performs an action associated with the bookmark node id.
bookmarkNodeId | number - The bookmark node id. |
Promise<void> BookmarkDataService::reloadBookmarkChildren | ( | parentBookmarkNodeId | ) |
Reloads the bookmark data for the given bookmark node id.
parentBookmarkNodeId | number|undefined - The parent bookmark node id, or undefined if need reload the first level bookmark nodes. |
BookmarkDataService::renameBookmark | ( | bookmarkNodeId | , |
newTitle | |||
) |
Renames the bookmark with the specified node id to the new title.
bookmarkNodeId | number - The bookmark node id. |
newTitle | string - The new title for the bookmark. |
BookmarkDataService::setColor | ( | bookmarkNodeId | , |
newColor | |||
) |
Updates the font color of the specified node id.
bookmarkNodeId | number - The bookmark node id. |
newColor | BookmarkTextColor - The text color of the bookmark node. |
BookmarkDataService::setDestination | ( | bookmarkNodeId | , |
newDestination | |||
) |
Updates the destination for the bookmark with the specified node id.
bookmarkNodeId | number - The bookmark node id. |
newDestination | BookmarkDestination|undefined - The new destination information. If not specified, it will be specified according to the position and zoom ratio of the currently visible page |
BookmarkDataService::setFontStyle | ( | bookmarkNodeId | , |
style | |||
) |
Updates the font style of the specified node ID.
bookmarkNodeId | number - The ID of bookmark node. |
style | BookmarkFontStyle - The font style. |