Bookmarks

  • 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 customised using regular UIAppearance APIs. To customise the appearance even further, your can use the custom image loading API to change the images. - see: PSPDFBookmarkIndicatorImageType

    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmarkIndicatorButton : UIButton

    Swift

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

    See

    PSPDFBookmarkManager
    See more

    Declaration

    Objective-C

    
    @interface PSPDFBookmark : PSPDFModel <NSCopying, NSMutableCopying>

    Swift

    class PSPDFBookmark : PSPDFModel, NSCopying, NSMutableCopying
  • The PSPDFBookmarkManager manages bookmarks for a given PSPDFDocument.

    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 PSPDFBookmarkManager. Instead attach a custom bookmark provider to achieve your desired behavior.

    Thread Safety

    PSPDFBookmarkManager 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 PSPDFBookmarkManager : 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

    PSPDFBookmarkManager

    See

    PSPDFBookmarksChangedNotification for change notifications.
    See more

    Declaration

    Objective-C

    @protocol PSPDFBookmarkProvider <NSObject>

    Swift

    protocol PSPDFBookmarkProvider : NSObjectProtocol