PSPDFOutlineParser


@interface PSPDFOutlineParser : NSObject

Parses the Outline/Table of Contents of a PDF.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFOutlineParser : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFOutlineParser : NSObject
  • Returns a single outline element for the specified page.

    If exactPageOnly is set, the outline will only be returned if it’s from the specific page. Else the last active set outline will be returned.

    Declaration

    Objective-C

    - (nullable PSPDFOutlineElement *)
    outlineElementForPageAtIndex:(NSUInteger)pageIndex
                   exactPageOnly:(BOOL)exactPageOnly;

    Swift

    func outlineElementForPage(at pageIndex: UInt, exactPageOnly: Bool) -> PSPDFOutlineElement?
  • Returns cached outline. starts parsing if outline is not yet created. Will always return at least a root element.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) PSPDFOutlineElement *_Nonnull outline;

    Swift

    var outline: PSPDFOutlineElement { get set }
  • Returns YES if outline is already parsed.

    Declaration

    Objective-C

    @property (readonly, getter=isOutlineParsed, atomic) BOOL outlineParsed;

    Swift

    var isOutlineParsed: Bool { get }
  • Returns YES if there is an outline in the document and we parsed it (outline.children > 0) Will parse the outline if needed.

    Declaration

    Objective-C

    @property (readonly, getter=isOutlineAvailable, nonatomic) BOOL outlineAvailable;

    Swift

    var isOutlineAvailable: Bool { get }
  • Attached document provider.

    Declaration

    Objective-C

    @property (readonly, nonatomic)
        PSPDFDocumentProvider *_Nullable documentProvider;

    Swift

    weak var documentProvider: PSPDFDocumentProvider? { get }