Opait PDF Library
Public Member Functions | Static Public Member Functions | Properties | List of all members
Opait.Pdf.PdfBookmark Class Reference

This class represent a node in the document's bookmarks hierarchy. More...

Inherited by Opait.Pdf.PdfBookmarks.

Public Member Functions

 PdfBookmark (string title)
 Creates a new bookmark node. More...
 
List< PdfBookmarkGetChildren ()
 Gets the list of child nodes of this PdfBookmark node. More...
 
void Add (PdfBookmark bookmark)
 Adds the specified bookmark as the last child of this bookmark. More...
 
void Insert (PdfBookmark bookmark, int index)
 Inserts the specified bookmark as the child of this bookmark at the specified index. More...
 
int IndexOf (PdfBookmark bookmark)
 Returns the index of a specified child bookmark. More...
 

Static Public Member Functions

static PdfBookmark Create (PdfPage page, string title, double left, double top, double zoom=0)
 Creates a bookmark node which opens a specified page at the specified coordinates and zoom level. More...
 
static PdfBookmark CreateFitPage (PdfPage page, string title, bool bounding=false)
 Creates a bookmark which fits the specified page or its bounding rectangle to the current display area. More...
 
static PdfBookmark CreateFitHorz (PdfPage page, string title, double top, bool bounding=false)
 Creates a bookmark which fits horizontally, top specified, the specified page or its bounding rectangle to the display area. More...
 
static PdfBookmark CreateFitVert (PdfPage page, string title, double left, bool bounding=false)
 Creates a bookmark which fits vertically, left specified, the specified page or its bounding rectangle to the display area. More...
 
static PdfBookmark CreateFitRect (PdfPage page, string title, PdfRectangle rc)
 Creates a bookmark which fits the specified rectangular area of the specified specified page to the current display area. More...
 

Properties

string Title [get, set]
 Gets or sets the display title of the bookmark node.
 
Color Color [get, set]
 Gets or sets the color used to display the bookmark node.
 
PdfBookmarkStyle Style [get, set]
 Gets or sets the styling flags for the display of the bookmark node.
 
bool IsOpen [get, set]
 Gets or sets a boolean flag to indicate whether the bookmark node will be open when initially displayed.
 
PdfBookmark FirstChild [get]
 Gets the first immediate child of this bookmark.
 
PdfBookmark LastChild [get]
 Gets the last immediate child of this bookmark.
 

Detailed Description

This class represent a node in the document's bookmarks hierarchy.

Constructor & Destructor Documentation

◆ PdfBookmark()

Opait.Pdf.PdfBookmark.PdfBookmark ( string  title)

Creates a new bookmark node.

Parameters
titleThe display title of the bookmark node.

Member Function Documentation

◆ Add()

void Opait.Pdf.PdfBookmark.Add ( PdfBookmark  bookmark)

Adds the specified bookmark as the last child of this bookmark.

Parameters
bookmarkThe child bookmark to add.

◆ Create()

static PdfBookmark Opait.Pdf.PdfBookmark.Create ( PdfPage  page,
string  title,
double  left,
double  top,
double  zoom = 0 
)
static

Creates a bookmark node which opens a specified page at the specified coordinates and zoom level.

Parameters
pageThe page that will be opened if the bookmark is clicked.
titleThe display title of the bookmark.
leftThe left location of the target page.
topThe top location of the target page.
zoomThe optional zoom factor.
Returns
The created bookmark.

◆ CreateFitHorz()

static PdfBookmark Opait.Pdf.PdfBookmark.CreateFitHorz ( PdfPage  page,
string  title,
double  top,
bool  bounding = false 
)
static

Creates a bookmark which fits horizontally, top specified, the specified page or its bounding rectangle to the display area.

Parameters
pageThe page that will be opened if the bookmark is clicked.
titleThe display title of the bookmark.
topThe top coordinate of the displayed page.
boundingIf specified, then fits the bounding area of the page; otherwise, fit the entire page.
Returns
The created bookmark.

◆ CreateFitPage()

static PdfBookmark Opait.Pdf.PdfBookmark.CreateFitPage ( PdfPage  page,
string  title,
bool  bounding = false 
)
static

Creates a bookmark which fits the specified page or its bounding rectangle to the current display area.

Parameters
pageThe page that will be opened if the bookmark is clicked.
titleThe display title of the bookmark.
boundingIf specified, then fits the bounding area of the page; otherwise, fit the entire page.
Returns
The created bookmark.

◆ CreateFitRect()

static PdfBookmark Opait.Pdf.PdfBookmark.CreateFitRect ( PdfPage  page,
string  title,
PdfRectangle  rc 
)
static

Creates a bookmark which fits the specified rectangular area of the specified specified page to the current display area.

Parameters
pageThe page that will be opened if the bookmark is clicked.
titleThe display title of the bookmark.
rcThe rectangular area of the page to fit.
Returns
The created bookmark.

◆ CreateFitVert()

static PdfBookmark Opait.Pdf.PdfBookmark.CreateFitVert ( PdfPage  page,
string  title,
double  left,
bool  bounding = false 
)
static

Creates a bookmark which fits vertically, left specified, the specified page or its bounding rectangle to the display area.

Parameters
pageThe page that will be opened if the bookmark is clicked.
titleThe display title of the bookmark.
leftThe top coordinate of the displayed page.
boundingIf specified, then fits the bounding area of the page; otherwise, fit the entire page.
Returns
The created bookmark.

◆ GetChildren()

List< PdfBookmark > Opait.Pdf.PdfBookmark.GetChildren ( )

Gets the list of child nodes of this PdfBookmark node.

Returns
The list of child nodes.

◆ IndexOf()

int Opait.Pdf.PdfBookmark.IndexOf ( PdfBookmark  bookmark)

Returns the index of a specified child bookmark.

Parameters
bookmarkThe child bookmark.
Returns
The index of the child bookmark.

◆ Insert()

void Opait.Pdf.PdfBookmark.Insert ( PdfBookmark  bookmark,
int  index 
)

Inserts the specified bookmark as the child of this bookmark at the specified index.

Parameters
bookmarkThe child bookmark to add.
indexThe index where the bookmark is to be added.