FoxitPDFSDKforWeb  7.1.1
Foxit PDF SDK for Web
PDFBookmark Class Reference

Public Member Functions

 insertBookmark (title, pageIndex, top, left, relationship=1)
 Insert a new bookmark to current bookmark. Will trigger Event Events.bookmarkAdded. More...
 
 remove ()
 Remove a specified bookmark. Will trigger Event Events.bookmarkRemoved. More...
 
 setProperty (properties)
 Set specity bookmark properties. More...
 

Detailed Description

PDFBookmark object

Member Function Documentation

◆ insertBookmark()

PDFBookmark::insertBookmark (   title,
  pageIndex,
  top,
  left,
  relationship = 1 
)
inline

Insert a new bookmark to current bookmark. Will trigger Event Events.bookmarkAdded.

Parameters
title{string} - Title string for the new bookmark.
pageIndex{number} - The index of the destination page in the PDF document.
top{number} - Horizontal coordinate value of a position as page's left-top position.
left{number} - Vertical coordinate value of a position as page's left-top position.
relationship{number} - The relationship between new bookmark and current bookmark. Default value is 1.
0: for new bookmark is first child of current bookmark.
1: for new bookmark is last child of current bookmark.
2: for new bookmark is previous sibling of current bookmark.
3: for new bookmark is next sibling of current bookmark.
4: for new bookmark is first sibling of current bookmark.
5: for new bookmark is last sibling of current bookmark.
Returns
{Promise.<Bookmark[]>} - New bookmark to JSON.

◆ remove()

PDFBookmark::remove ( )
inline

Remove a specified bookmark. Will trigger Event Events.bookmarkRemoved.

Returns
{Promise.<Boolean>} - true means success, and false means failure.

◆ setProperty()

PDFBookmark::setProperty (   properties)
inline

Set specity bookmark properties.

Parameters
properties{object} - {title:string, color: number, style: number}. Will trigger Event Events.bookmarkUpdated. color number type color value in RRGGBB format. style 0 means Normal, 1 means Italic, 2 means Bold, 3 means Italic and Bold.
Returns
{Promise.<Bookmark[][]>} - Modified bookmark to JSON.

Foxit Software Corporation Logo
@2019 Foxit Software Incorporated. All rights reserved.