Bookmark Class Documentation
class Bookmark : SystemIDisposableNamespace: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.
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: Bookmarkthe bookmark being added.
Returns:
voidAdd an existing bookmark to be the child bookmark of a parent.
AddNextSibling
void AddNextSibling(Bookmark NewRightSibling)Parameters
NewRightSibling: BookmarkThe bookmark to become the new right sibling.
Returns:
voidAdd a bookmark to a tree as the next (right) sibling.
AddPreviousSibling
void AddPreviousSibling(Bookmark NewLeftSibling)Parameters
NewLeftSibling: BookmarkThe bookmark to become the new left sibling.
Returns:
voidAdd a bookmark to a tree as the previous (left) sibling.
AddSubtree
void AddSubtree(Bookmark subtree, string title)Parameters
subtree: BookmarkThe bookmark subtree to add.
title: stringthe title of the newly added subtree.
Returns:
voidAdd a copy of a subtree as the new last child of a parent bookmark, and gives the subtree an initial title.
CreateNewChild
Parameters
page: PageThe PDF page of the new child bookmark.
title: stringThe initial title of the new child bookmark.
Returns:
BookmarkThe 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: stringThe initial text of the new child bookmark.
Returns:
BookmarkThe 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: stringThe initial text for the new right sibling.
Returns:
BookmarkThe 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:
voidRemoves a bookmark subtree from the bookmark tree containing it.
Dispose
void Dispose()Returns:
voidEquals
override bool Equals(object obj)Parameters
obj: object
Returns:
override boolFindDescendentBookmark
Bookmark FindDescendentBookmark(string title)Parameters
title: stringThe title of the bookmark for which to search.
Returns:
BookmarkThe 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: stringThe title of the bookmark for which to search.
maxDepth: intIf supplied, declares the number of levels below this bookmark to search. (If omitted, the entire subtree is searched.)
Returns:
BookmarkThe 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:
booltrue if the bookmark has children.
Does the bookmark have children?
IsOpen
bool IsOpen()Returns:
booltrue if the bookmark is open.
Is the bookmark open?
ToString
override string ToString()Returns:
override stringA 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.
Unlink
void Unlink()Returns:
voidUnlinks the bookmark from the bookmark tree that contains it and adjusts the tree appropriately.