PSPDFAnnotationSummarizer


@interface PSPDFAnnotationSummarizer : NSObject

Produces a summary of the annotations in a document.

  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Initialize the annotation summarizer with a document.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDocument:(nonnull PSPDFDocument *)document;

    Swift

    init(document: PSPDFDocument)
  • The document to generate the annotation summary out of.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFDocument *_Nonnull document;

    Swift

    var document: PSPDFDocument { get }
  • Returns the annotation summary as a formatted string for the indexes in pages.

    Note

    If the summary generation is cancelled while this method is executing, it will return nil.

    Declaration

    Objective-C

    - (nullable NSAttributedString *)annotationSummaryForPages:
        (nonnull NSIndexSet *)pages;

    Swift

    func annotationSummary(forPages pages: IndexSet) -> NSAttributedString?

    Parameters

    pages

    The pages to scan for annotations to generate the summary.

  • Returns the annotation summary as a formatted string for the indexes in pages, and reports progress.

    Note

    If the summary generation is cancelled while this method is executing, it will return nil.

    Declaration

    Objective-C

    - (nullable NSAttributedString *)
        annotationSummaryForPages:(nonnull NSIndexSet *)pages
                         progress:
                             (void (^_Nullable)(NSUInteger, CGFloat))progressBlock;

    Swift

    func annotationSummary(forPages pages: IndexSet, progress progressBlock: ((UInt, CGFloat) -> Void)? = nil) -> NSAttributedString?

    Parameters

    pages

    The pages to scan for annotations to generate the summary.

    progressBlock

    Block to observe the progress of summarizing the annotations.

  • Cancels the annotation summary generation, if currently in progress.

    Declaration

    Objective-C

    - (void)cancelSummaryGeneration;

    Swift

    func cancelSummaryGeneration()