Bookmark Class Documentation

class Bookmark : SystemIDisposable

Namespace:Datalogics::PDFL

Inherits from:
SystemIDisposable

Detailed Description

A bookmark on a page of a PDF document.

Each bookmark has a title that appears on screen, and an action that specifies what happens when a user clicks on the bookmark.

The typical action for a user-created bookmark is to move to another location in the current document, although any action (see Action) can be specified.

Referenced by

Property Documentation

Action

Action Action[get, set]

Get the Action for a bookmark.

Color

Color Color[get, set]

Get the color of the bookmark.

Count

int Count[get]

Get the number of open bookmarks in the subtree under this bookmark.

FirstChild

Bookmark FirstChild[get]

Gets a bookmark's first child.

Flags

BookmarkFlags Flags[get, set]

Get the flags for the bookmark.

Indent

int Indent[get]

Get the indentation level of a bookmark in its containing tree.

LastChild

Bookmark LastChild[get]

Gets a bookmark's last child.

Next

Bookmark Next[get]

Gets a bookmark's next (right) sibling.

Open

bool Open[get, set]

Is the bookmark open?

PDFDict

PDFDict PDFDict[get]

Get the dictionary associated with the bookmark.

Parent

Bookmark Parent[get]

Gets a bookmark's parent.

Previous

Bookmark Previous[get]

Gets a bookmark's previous (left) sibling.

Title

string Title[get, set]

The title of the bookmark.

ViewDestination

ViewDestination ViewDestination[get]

If this bookmark has a GoTo action, then return the destination of the action, else return null.

Member Function Documentation

AddChild

void AddChild(Bookmark child)

Parameters

child: Bookmark

the bookmark being added.

Returns:

void

Add an existing bookmark to be the child bookmark of a parent.

AddNextSibling

void AddNextSibling(Bookmark NewRightSibling)

Parameters

NewRightSibling: Bookmark

The bookmark to become the new right sibling.

Returns:

void

Add a bookmark to a tree as the next (right) sibling.

AddPreviousSibling

void AddPreviousSibling(Bookmark NewLeftSibling)

Parameters

NewLeftSibling: Bookmark

The bookmark to become the new left sibling.

Returns:

void

Add a bookmark to a tree as the previous (left) sibling.

AddSubtree

void AddSubtree(Bookmark subtree, string title)

Parameters

subtree: Bookmark

The bookmark subtree to add.

title: string

the title of the newly added subtree.

Returns:

void

Add a copy of a subtree as the new last child of a parent bookmark, and gives the subtree an initial title.

CreateNewChild

Bookmark CreateNewChild(Page page, string title)

Parameters

page: Page

The PDF page of the new child bookmark.

title: string

The initial title of the new child bookmark.

Returns:

Bookmark

The newly created child bookmark.

(Deprecated, function may be removed in the future, use single-parameter CreateNewChild() method instead) Create a bookmark and add to a parent as the last child bookmark, and give the new bookmark an initial title.

CreateNewChild

Bookmark CreateNewChild(string title)

Parameters

title: string

The initial text of the new child bookmark.

Returns:

Bookmark

The newly created child bookmark.

Create a new bookmark and add to a parent as the last child bookmark, using supplied string as the initial text.

CreateNewSibling

Bookmark CreateNewSibling(string title)

Parameters

title: string

The initial text for the new right sibling.

Returns:

Bookmark

The newly created sibling bookmark.

Create a new bookmark in a tree as the next (right) sibling, using supplied string as the initial text.

Destroy

void Destroy()

Returns:

void

Removes a bookmark subtree from the bookmark tree containing it.

Dispose

void Dispose()

Returns:

void

Equals

override bool Equals(object obj)

Parameters

obj: object

Returns:

override bool

FindDescendentBookmark

Bookmark FindDescendentBookmark(string title)

Parameters

title: string

The title of the bookmark for which to search.

Returns:

Bookmark

The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title.

Find bookmark by its title within the subtree of which this bookmark is the root, searching within the entire subtree.

FindDescendentBookmark

Bookmark FindDescendentBookmark(string title, int maxDepth)

Parameters

title: string

The title of the bookmark for which to search.

maxDepth: int

If supplied, declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.)

Returns:

Bookmark

The bookmark within this bookmark's tree that has the supplied title. Returns NULL if there is no bookmark with the supplied title.

Find bookmark by its title within the subtree of which this bookmark is the root, searching within the subtree to a depth determined by maxDepth (e.g., 0 = this bookmark only and not any of its children, 1 = search one level below this bookmark level, etc.)

HasChildren

bool HasChildren()

Returns:

bool

true if the bookmark has children.

Does the bookmark have children?

IsOpen

bool IsOpen()

Returns:

bool

true if the bookmark is open.

Is the bookmark open?

ToString

override string ToString()

Returns:

override string

A string describing this Bookmark and its properties.

Returns a string representation of this Bookmark.

The string includes the title, color, flags, count, indent level, open state, and view destination if available.