PSPDFLabelParser

Objective-C


@interface PSPDFLabelParser : NSObject <PSPDFOverridable>

Swift

class LabelParser : NSObject, Overridable

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

  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Not the designated initializer

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Attached document provider.

    Declaration

    Objective-C

    @property (nonatomic, weak, readonly) 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:(PSPDFPageIndex)pageIndex;

    Swift

    func pageLabelForPage(at pageIndex: PageIndex) -> 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.

    Declaration

    Objective-C

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

    Swift

    var labels: [NSNumber : String] { get }

    Return Value

    Labels as ordered dictionary of page number to page label.