Bookmarks

  • A bookmark encapsulates a PDF action and a name. It is managed by a document’s bookmark manager.

    See

    BookmarkManager
    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmark
        : PSPDFModel <NSCopying, NSMutableCopying, PSPDFOverridable>

    Swift

    class Bookmark : ModelObject, NSCopying, NSMutableCopying, Overridable
  • The BookmarkManager manages bookmarks for a given Document.

    You should not initialize a bookmark manager yourself but instead access it through the document’s bookmarkManager property.

    Bookmarks and PDF files

    The concept of bookmarks does not exist in a PDF document. Therefore all the bookmarks you add will be stored inside the PDF but are only read by PSPDFKit and Apple Preview. If you want to support other formats, you need to create your own bookmark provider and store them yourself.

    Subclassing

    You should not subclass BookmarkManager. Instead attach a custom bookmark provider to achieve your desired behavior.

    Thread Safety

    BookmarkManager is thread safe and can be accessed from any thread. To ensure multiple operations are executed as one serial block without other threads interfering, wrap you operations in performBlock: or performBlockAndWait: whenever you need to do complex operations.

    However, if you need to do something that can be achieved by calling a single method on this class (e.g. adding a bookmark or removing a known bookmark), call the appropriate method directly as it is more performant than wrapping calls in the above mentioned block calls.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmarkManager : NSObject

    Swift

    class BookmarkManager : NSObject
  • A Bookmark Provider is used to store and read bookmarks from a data source.

    If you need to store bookmarks in a file format other than what PSPDFKit supports by default, you can create your own bookmark provider and attach it to a document’s bookmark manager.

    See

    BookmarkManager

    See

    PSPDFBookmarksChangedNotification for change notifications.
    See more

    Declaration

    Objective-C

    @protocol PSPDFBookmarkProvider <NSObject>

    Swift

    protocol BookmarkProvider : NSObjectProtocol
  • Custom cell used for bookmarks.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmarkCell
        : PSPDFThumbnailTextCell <UITextFieldDelegate, PSPDFOverridable>

    Swift

    class BookmarkCell : ThumbnailTextCell, UITextFieldDelegate, Overridable
  • Custom UIButton that sets the appropriate bookmark image based on imageType, and applies a shadow as well. The image will always have a tint applied to it, based on the normalTintColor and selectedTintColor properties These colors can be customized using regular UIAppearance APIs. To customize the appearance even further, your can use the custom image loading API to change the images.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmarkIndicatorButton : UIButton <PSPDFOverridable>

    Swift

    class BookmarkIndicatorButton : UIButton, Overridable
  • Show list of bookmarks for the current document and allows editing/reordering of the bookmarks.

    See more
  • Table view cell that shows a thumbnail image along with a few text elements.

    See more

    Declaration

    Objective-C

    
    @interface PSPDFThumbnailTextCell : PSPDFNonAnimatingTableViewCell

    Swift

    class ThumbnailTextCell : NonAnimatingTableViewCell