.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

PdfBookmark Class

Contains settings that are used to specify bookmarks in a document.

Namespace: DevExpress.Pdf

Assembly: DevExpress.Pdf.v20.1.Core.dll


public class PdfBookmark :
Public Class PdfBookmark
    Implements IPdfBookmarkParent


An instance of the PdfBookmark class is accessible via the PdfDocument.Bookmarks property.

You can change a bookmark's attribute (e.g., rename a bookmark using the PdfBookmark.Title property, change the bookmark's font style using the PdfBookmark.IsBold, PdfBookmark.IsItalic properties, and specify the bookmark destination using the PdfBookmark.Destination property).


The bookmark hierarchy must contain only distinct instances of the PdfBookmark class. The following code snippet shows this prohibited action.

PdfBookmark bookmark = new PdfBookmark();


This example shows how to create bookmarks in code.

To do this:

using DevExpress.Pdf;

namespace AddBookmarks {
    class Program {
        static void Main(string[] args) {

            using (PdfDocumentProcessor processor = new PdfDocumentProcessor()) {

                // Load a document.

                // Create bookmarks and add them to the PDF document.
                PdfDestination destination1 = processor.CreateDestination(1, 180, 150);
                PdfDestination destination2 = processor.CreateDestination(1, 168, 230);
                PdfDestination destination3 = processor.CreateDestination(1, 20, 350);
                processor.Document.Bookmarks.Add(new PdfBookmark() { Title = "PDF Document Processor", Destination = destination1 });
                processor.Document.Bookmarks.Add(new PdfBookmark() { Title = "Display, Print and Export PDF Documents", Destination = destination2 });
                processor.Document.Bookmarks.Add(new PdfBookmark() { Title = "Learn More", Destination = destination3 });

                // Save the result document.


See Also