PSPDFAbstractTextOverlayAnnotation


@interface PSPDFAbstractTextOverlayAnnotation : PSPDFAnnotation

Base class for Highlight, Underline, StrikeOut and Squiggly annotations.

  • Convenience initializer that creates a text annotation from glyphs. glyphs requires to have at least one object, otherwise nil is returned. pageRotation is the rotation property of the PSPDFPageInfo

    Declaration

    Objective-C

    + (nullable instancetype)
    textOverlayAnnotationWithGlyphs:(nullable NSArray<PSPDFGlyph *> *)glyphs
                       pageRotation:(NSInteger)pageRotation;

    Swift

    convenience init?(glyphs: [PSPDFGlyph]?, pageRotation: Int)
  • Helper that will query the associated PSPDFDocument to get the highlighted content. (Because we actually just write rects, it’s not easy to get the underlying text)

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSString *_Nonnull highlightedString;

    Swift

    var highlightedString: String { get }