Bookmarks

  • 3 minutes to read

The document introduces PDF Viewer bookmarks, and describes their capabilities and customization options on a navigation pane.

This document consists of the following sections.

Overview

Bookmarks (outlines) are used to navigate quickly from one part of a document to another. The PDF Viewer shows bookmarks on the outlines viewer panel for a PDF document that contains them.

When you click on a bookmark, the PDF Viewer displays a page linked to the bookmark. Bookmarks can also open web pages.

PDFBookmarks

Bookmarks are displayed in a hierarchical tree providing a convenient document overview. They can show or hide the document hierarchy in the outlines viewer. To open (or close) the bookmark items, click them with the mouse.

BookmarksTree

After the bookmark item is open you can see its children in the panel.

Customization

This section describes properties that can be used to customize bookmarks of a PDF Viewer and explains how they can be accessed both at design time and runtime.

To customize bookmark behavior on the outlines viewer panel, access a PdfOutlinesViewerSettings object using the PdfViewerControl.OutlinesViewerSettings property.

<dxpdf:PdfViewerControl>
    <dxpdf:PdfViewerControl.OutlinesViewerSettings>
        <dxpdf:PdfOutlinesViewerSettings/>
    </dxpdf:PdfViewerControl.OutlinesViewerSettings>
</dxpdf:PdfViewerControl>

The main outline viewer settings are detailed in the following table.

Member Description
PdfOutlinesViewerSettings.HideOutlinesViewer Gets or sets a value which specifies whether the PDF outlines panel is hidden.
PdfOutlinesViewerSettings.OutlinesViewerStyle Gets or sets a style applied to the outlines viewer contents. This is a dependency property.
PdfOutlinesViewerSettings.OutlinesViewerInitialState Gets or sets the outlines viewer visible state after loading a new PDF document.

Bookmark settings are also accessible at runtime. For this, click the Options drop-down button in the Bookmarks panel, as shown below.

PDFBookmarkOptions

Finally, you can change the outlines viewer visible state for the PDF Viewer using the PdfOutlinesViewerSettings.OutlinesViewerState (specifies the current visible state of the outlines viewer) and PdfOutlinesViewerSettings.OutlinesViewerInitialState (specifies the outlines viewer visibility behavior after loading new PDF document) properties. These properties can be set to one of the following values.

  • Expanded - the outlines viewer panel is expanded
  • Collapsed - the outlines viewer panel is collapsed
  • Visible – the outlines viewer panel is visible
NOTE

If a PDF document does not have bookmarks, the outlines viewer is hidden (the PdfOutlinesViewerSettings.HideOutlinesViewer property is set to true).

The PdfOutlinesViewerSettings.OutlinesViewerInitialState property also has the additional Null value (the Default mode). In this mode, the PdfOutlinesViewerSettings.OutlinesViewerState property is set either to Collapsed if a PDF document contains bookmarks.

See Also