Skip to content

Bookmark plugin

The bookamrk plugin lists all outline bookmarks of a PDF document. Clicking a bookmark item will jump to its associate sections

Install

> npm install @sse-ui/pdf-bookmark

OR

> yarn add @sse-ui/pdf-bookmark

The bookmark plugin is included in the default-layout plugin

Usage

1. Import the plugin and styles

javascript
import { bookmarkPlugin } from "@sse-ui/pdf-bookmark";

// Import styles
import "@sse-ui/pdf-bookmark/lib/styles/index.css";

2. Create the plugin instance

javascript
const bookmarkPluginInstance = bookmarkPlugin();

The plugin instance bookmarkPluginInstance provides the following property:

PROPERTYTYPEDESCRIPTIONFROM
BookmarksReactElementThe component lists available bookmarks1.0.0

3. Register the plugin

Register the bookmark plugin instance, and use the <Bookmarks /> component to list all bookmarks.

javascript
const { Bookmarks } = bookmarkPluginInstance;

<Viewer plugins={[bookmarkPluginInstance]}> />;

Properties

The bookmark plugin provides other properties as following:

javascript
import { DownArrowIcon, RightArrowIcon } from "@sse-ui/pdf-bookmark";
PROPERTYTYPEDESCRIPTIONFROM
DownArrowIconReactElementThe down arrow icon1.0.0
RightArrowIconReactElementThe right arrow icon1.0.0

Released under the MIT License.