Class: Bookmark

CoreControls. Bookmark

Represents a bookmark in a Document.


new Bookmark(children, name, pageNumber, The, verticalOffset, horizontalOffset [, url])

Bookmarks typically represent an outline of the document, and as each bookmark is usually associated with a specific page in a document, they are typically used to facilitate navigation.

Parameters:
Name Type Argument Description
children array

A list of child bookmarks

name string

The name of the bookmark

pageNumber number

The page number of the bookmark

The CoreControls.Bookmark

parent bookmark of this bookmark

verticalOffset number

The vertical position that the linked page will be scrolled to

horizontalOffset number

The horizontal position that the linked page will be scrolled to

url string <optional>

An optional parameter that allows the bookmark to link to a URL instead of a page number (this overrides the page number)

Methods


getChildren()

Gets the children of the bookmark.

Returns:

The children of the bookmark

Type
array

getHPos()

Gets the horizontal position of the bookmark.

Returns:

The horizontal position of the bookmark

Type
number

getName()

Gets the name of the bookmark.

Returns:

The name of the bookmark

Type
string

getPageNumber()

Gets the page number of the bookmark.

Returns:

The page number of the bookmark

Type
integer

getParent()

Gets the parent of this bookmark if it has one.

Returns:

The parent of the bookmark

Type
CoreControls.Bookmark

getURL()

Gets the url of the bookmark if it has one.

Returns:

The url of the bookmark

Type
string

getVPos()

Gets the vertical position of the bookmark.

Returns:

The vertical position of the bookmark

Type
number

isValid()

Determines whether the bookmark goes to a valid destination.

Returns:

Whether the bookmark points to a valid destination

Type
boolean