Class: Bookmark

PSPDFKit.Bookmark

This record is used to persist the information for a bookmark.

A bookmark is an object that registers a PDF action, usually triggered to go to a page.

Extends

  • Immutable.Record

Members

Methods




Members

The action that will be triggered when the bookmark is either clicked or tapped.

Please refer to PSPDFKit.Actions for an in-depth look at PDF actions.

Type:

id: string

A unique identifier to describe the bookmark. When a bookmark is created in the UI, the viewer has to generate a unique ID.

When changes are saved to the underlying bookmark provider, we call PSPDFKit.Instance#ensureBookmarkSaved to make sure the annotation has been persisted from the provider.

Type:
  • string

(nullable) name: string

optional

An optional name to associate to the bookmark.

Type:
  • string
Default Value:
  • null

(nullable) pdfBookmarkId: string

When the bookmark is extracted directly from a PDF file, the pdfBookmarkId refers to the identifier that was used in the PDF document.

This ID is optional since newly created bookmarks using the SYNCProvider annotation provider won't have a pdfBookmarkId assigned.

Type:
  • string
Default Value:
  • null

Methods

(static) fromSerializableObject() → {PSPDFKit.Bookmark}

Bookmark deserializer. Converts a bookmark object to a PSPDFKit.Bookmark.

Parameters:
Type Description
object
Returns:
Type
PSPDFKit.Bookmark

(static) toSerializableObject() → {object}

Bookmark serializer. Converts a bookmark to InstantJSON compliant objects.

Parameters:
Type Description
PSPDFKit.Bookmark
Returns:
Type
object

See also