Class Index

Classes


Class PDFNet.Bookmark

PDFNet.Bookmark

Class Summary
Constructor Attributes Constructor Name and Description
 
A %PDF document may optionally display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another.
Method Summary
Method Attributes Method Name and Description
 
addChild(in_bookmark)
adds the specified Bookmark as the new last child of this Bookmark.
 
addNewChild(in_title)
Adds a new Bookmark as the new last child of this Bookmark.
 
addNewNext(in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new right sibling.
 
addNewPrev(in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new left sibling.
 
addNext(in_bookmark)
adds the specified Bookmark as the new right sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately.
 
addPrev(in_bookmark)
adds the specified Bookmark as the new left sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately.
 
compare(in_bookmark)
Compares two Bookmark objects for equality.
 
copy()
Copy Constructor.
<static>  
PDFNet.Bookmark.create(in_doc, in_title)
Creates a new valid Bookmark with given title in the specified document.
<static>  
PDFNet.Bookmark.createFromObj(in_bookmark_dict)
A constructor.
 
removes the Bookmark's subtree from the bookmark tree containing it.
 
find(in_title)
Returns the Bookmark specified by the given title string.
 
Returns the Bookmark's action.
 
Returns the Bookmark's RGB color value.
 
Returns the Bookmark's first child.
 
Returns the Bookmark's flags.
 
Returns the indentation level of the Bookmark in its containing tree.
 
Returns the Bookmark's last child.
 
Returns the Bookmark's next (right) sibling.
 
Returns the number of opened bookmarks in this subtree.
 
Returns the Bookmark's parent Bookmark.
 
Returns the Bookmark's previous (left) sibling.
 
Returns the underlying SDF/Cos object.
 
Returns the Bookmark's title string.
 
Returns the Bookmark's title string object.
 
Indicates whether the Bookmark has children.
 
Indicates whether the Bookmark is open.
 
Indicates whether the Bookmark is valid (non-null).
 
removes the Bookmark's action.
 
setAction(in_action)
sets the Bookmark's action.
 
setColor(in_r, in_g, in_b)
Sets the Bookmark's color value.
 
setFlags(in_flags)
Sets the Bookmark's flags.
 
setOpen(in_open)
Opens or closes the Bookmark.
 
setTitle(title)
Sets the Bookmark's title string.
 
unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately.
Class Detail
PDFNet.Bookmark(id)
A %PDF document may optionally display a document outline on the screen, allowing the user to navigate interactively from one part of the document to another. The outline consists of a tree-structured hierarchy of Bookmarks (sometimes called outline items), which serve as a 'visual table of contents' to display the document's structure to the user. 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 PDF::Action) can be specified. Bookmark is a utility class used to simplify work with %PDF bookmarks (or outlines; see section 8.2.2 'Document Outline' in %PDF Reference Manual for more details).
Parameters:
id
Method Detail
addChild(in_bookmark)
adds the specified Bookmark as the new last child of this Bookmark.
Parameters:
{Bookmark} in_bookmark
The Bookmark object to be added as a last child of this Bookmark.

{Bookmark} addNewChild(in_title)
Adds a new Bookmark as the new last child of this Bookmark.
Parameters:
{string} in_title
The title string value of the new Bookmark.
Returns:
{Bookmark} A promise that resolves to the newly created child Bookmark.

{Bookmark} addNewNext(in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new right sibling.
Parameters:
{string} in_title
The title string value of the new Bookmark.
Returns:
{Bookmark} A promise that resolves to the newly created sibling Bookmark.

{Bookmark} addNewPrev(in_title)
Adds a new Bookmark to the tree containing this Bookmark, as the new left sibling.
Parameters:
{string} in_title
The title string value of the new Bookmark.
Returns:
{Bookmark} A promise that resolves to the newly created sibling Bookmark.

addNext(in_bookmark)
adds the specified Bookmark as the new right sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately.
Parameters:
{Bookmark} in_bookmark
The Bookmark object to be added to this Bookmark.

addPrev(in_bookmark)
adds the specified Bookmark as the new left sibling to this Bookmark, adjusting the tree containing this Bookmark appropriately.
Parameters:
{Bookmark} in_bookmark
The Bookmark object to be added to this Bookmark.

{boolean} compare(in_bookmark)
Compares two Bookmark objects for equality.
Parameters:
{Bookmark} in_bookmark
A reference to an existing Bookmark object.
Returns:
{boolean} A promise that resolves to true if the both Bookmarks share the same underlying SDF/Cos object; otherwise false.

{Bookmark} copy()
Copy Constructor. Creates a new Bookmark object equal to the existing Bookmark object.
Returns:
{Bookmark} A promise that resolves to a new Bookmark object.

<static> {Bookmark} PDFNet.Bookmark.create(in_doc, in_title)
Creates a new valid Bookmark with given title in the specified document.
Parameters:
{PDFDoc} in_doc
The document in which a Bookmark is to be created.
{string} in_title
The title string value of the new Bookmark.
Returns:
{Bookmark} A promise that resolves to the new Bookmark.

<static> {Bookmark} PDFNet.Bookmark.createFromObj(in_bookmark_dict)
A constructor. Creates a Bookmark and initialize it using given Cos/SDF object.
Parameters:
{Obj} in_bookmark_dict
Pointer to the Cos/SDF object (outline item dictionary).
Returns:
{Bookmark} A promise that resolves to the new Bookmark.

delete()
removes the Bookmark's subtree from the bookmark tree containing it.

{Bookmark} find(in_title)
Returns the Bookmark specified by the given title string.
Parameters:
{string} in_title
The title string value of the Bookmark to find.
Returns:
{Bookmark} A promise that resolves to a Bookmark matching the title string value specified.

{Action} getAction()
Returns the Bookmark's action.
Returns:
{Action} A promise that resolves to the Bookmark's action.

getColor()
Returns the Bookmark's RGB color value.

{Bookmark} getFirstChild()
Returns the Bookmark's first child.
Returns:
{Bookmark} A promise that resolves to the Bookmark's first child.

{number} getFlags()
Returns the Bookmark's flags.
Returns:
{number} A promise that resolves to the flags of the Bookmark object. Bit 1 (least-significant bit) indicates italic font whereas bit 2 indicates bold font. Therefore, 0 indicates normal, 1 is italic, 2 is bold, and 3 is bold-italic.

{number} getIndent()
Returns the indentation level of the Bookmark in its containing tree.
Returns:
{number} A promise that resolves to the indentation level of the Bookmark in its containing tree.

{Bookmark} getLastChild()
Returns the Bookmark's last child.
Returns:
{Bookmark} A promise that resolves to the Bookmark's last child.

{Bookmark} getNext()
Returns the Bookmark's next (right) sibling.
Returns:
{Bookmark} A promise that resolves to the Bookmark's next (right) sibling.

{number} getOpenCount()
Returns the number of opened bookmarks in this subtree.
Returns:
{number} A promise that resolves to the number of opened bookmarks in this subtree (not including this Bookmark). If the item is closed, a negative integer whose absolute value specifies how many descendants would appear if the item were reopened.

{Bookmark} getParent()
Returns the Bookmark's parent Bookmark.
Returns:
{Bookmark} A promise that resolves to the Bookmark's parent Bookmark.

{Bookmark} getPrev()
Returns the Bookmark's previous (left) sibling.
Returns:
{Bookmark} A promise that resolves to the Bookmark's previous (left) sibling.

{Obj} getSDFObj()
Returns the underlying SDF/Cos object.
Returns:
{Obj} A promise that resolves to the underlying SDF/Cos object.

{string} getTitle()
Returns the Bookmark's title string.
Returns:
{string} A promise that resolves to the Bookmark's title string).

{Obj} getTitleObj()
Returns the Bookmark's title string object.
Returns:
{Obj} A promise that resolves to the Bookmark's title string object.

{boolean} hasChildren()
Indicates whether the Bookmark has children.
Returns:
{boolean} A promise that resolves to true if the Bookmark has children; otherwise false.

{boolean} isOpen()
Indicates whether the Bookmark is open.
Returns:
{boolean} A promise that resolves to true if this Bookmark is open; otherwise false.

{boolean} isValid()
Indicates whether the Bookmark is valid (non-null).
Returns:
{boolean} A promise that resolves to true if this is a valid (non-null) Bookmark; otherwise false.

removeAction()
removes the Bookmark's action.

setAction(in_action)
sets the Bookmark's action.
Parameters:
{Action} in_action
The new Action for the Bookmark.

setColor(in_r, in_g, in_b)
Sets the Bookmark's color value.
Parameters:
{number} in_r
The red component of the color.
{number} in_g
The green component of the color.
{number} in_b
The blue component of the color.

setFlags(in_flags)
Sets the Bookmark's flags.
Parameters:
{number} in_flags
The new bookmark flags. Bit 1 (the least-significant bit) indicates italic font whereas bit 2 indicates bold font. Therefore, 0 indicates normal, 1 is italic, 2 is bold, and 3 is bold-italic.

setOpen(in_open)
Opens or closes the Bookmark.
Parameters:
{boolean} in_open
Boolean value that contains the status. If true, the Bookmark is opened. Otherwise the Bookmark is closed.

setTitle(title)
Sets the Bookmark's title string.
Parameters:
{string} title
The new title string for the bookmark.

unlink()
unlinks this Bookmark from the bookmark tree that contains it, and adjusts the tree appropriately.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Sep 09 2016 14:32:38 GMT-0700 (PDT)