Skip to main content

BookmarkList

Version: 3.0

cete.dynamicpdf.viewer.bookmarklist

BookmarkList​

Represents a collection of bookmarks.

public class BookmarkList : IEnumerable
Public Class BookmarkList
Implements IEnumerable

Inheritance: Object → BookmarkList

Implements: IEnumerable

Licensing Info​

This class is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Examples​

The following example will get the collection of bookmarks from PdfDocument object.

Imports System
Imports System.Windows.Forms
Imports ceTe.DynamicPDF.Viewer

Public Class Form1
Inherits System.Windows.Forms.Form

Private MyPdfViewer As PdfViewer

Sub New()
InitializeComponent()
End Sub

Private Sub InitializeComponent()
Me.MyPdfViewer = New PdfViewer()
Me.Controls.Add(MyPdfViewer)
End Sub

Shared Sub Main()
Application.Run(New Form1())
End Sub

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Dim MyDocument As New PdfDocument("C:\MyDocument.pdf")

' Get the Bookmark List from PDF document object.
Dim MyBookmarksList As BookmarkList = MyDocument.Bookmarks

' Get the count of bookmarks as below.
Dim MyBookmarksCount As Integer = MyBookmarksList.Count

End Sub

End Class
using System;
using System.Windows.Forms;
using ceTe.DynamicPDF.Viewer;

namespace DynamicPDFViewerDemo
{
public class Form1 : Form
{
private ceTe.DynamicPDF.Viewer.PdfViewer pdfViewer;

public Form1()
{
InitializeComponent();
this.Load += new EventHandler(Form1_Load);
}

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void InitializeComponent()
{
this.pdfViewer = new PdfViewer();
this.Controls.Add(pdfViewer);
}

private void Form1_Load(object sender, EventArgs e)
{
PdfDocument document = new PdfDocument(@"C:\MyDocument.pdf");

// Get the Bookmark List from PDF document object.
BookmarkList bookmarkList = document.Bookmarks;

// Get the count of bookmarks as below.
int bookmarksCount = bookmarkList.Count;

}
}
}

Properties​

Count​

Gets the count of the bookmarks present in the PdfDocument .

public int Count { get; }
Public Property Count As Int32

Property Value​

Int32

Licensing Info​

This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Item[Int32]​

Gets a bookmark from bookmark list.

public Bookmark this[int index] { get; }
Public Property Item(index As Integer) As Bookmark

Property Value​

Bookmark

Licensing Info​

This property is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

Methods​

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

Licensing Info​

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

GetEnumerator()​

Returns an enumerator that iterates through a collection of bookmarks.

public IEnumerator GetEnumerator()
Function GetEnumerator() As IEnumerator

Returns​

An IEnumerator object that can be used to iterate through the collection of bookmarks.

Licensing Info​

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

Licensing Info​

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

Licensing Info​

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Licensing Info​

This method is a DynamicPDF Viewer feature. One of the following is required for non-evaluation usage:

See Also​

ceTe.DynamicPDF.Viewer