PSPDFLabelParser


@interface PSPDFLabelParser : NSObject

Parses Page Labels (see PDF Reference ยง8.3.1) Add custom labels with Adobe Acrobat. http://www.w3.org/WAI/GL/WCAG20-TECHS/PDF17.html

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFLabelParser : NSObject
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFLabelParser : NSObject
  • Attached document provider.

    Declaration

    Objective-C

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

    Swift

    weak var documentProvider: PSPDFDocumentProvider? { get }
  • Returns a page label for a certain page. Returns nil if no pageLabel is available.

    Declaration

    Objective-C

    - (nullable NSString *)pageLabelForPageAtIndex:(NSUInteger)pageIndex;

    Swift

    func pageLabelForPage(at pageIndex: UInt) -> String?
  • Search all page labels for a matching page. Returns NSNotFound if page not found. If partialMatching is enabled, the most likely page match is returned.

    Declaration

    Objective-C

    - (NSUInteger)pageForPageLabel:(nonnull NSString *)pageLabel
                   partialMatching:(BOOL)partialMatching;

    Swift

    func page(forPageLabel pageLabel: String, partialMatching: Bool) -> UInt
  • Returns all page labels. - returns: Labels as ordered dictionary of page number to page label.

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic)
        NSDictionary<NSNumber *, NSString *> *_Nonnull labels;

    Swift

    var labels: [NSNumber : String] { get }

    Return Value

    Labels as ordered dictionary of page number to page label.