PSPDFWord


@interface PSPDFWord : NSObject <NSCopying, NSSecureCoding>

Represents a word. Formed out of (usually) multiple glyphs.

  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFWord : NSObject <NSCopying, NSSecureCoding>
  • Undocumented

    Declaration

    Objective-C

    
    @interface PSPDFWord : NSObject <NSCopying, NSSecureCoding>
  • Initialize with glyphs (PSPDFGlyph).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithGlyphs:
                                (nonnull NSArray<PSPDFGlyph *> *)wordGlyphs
                              pageRotation:(NSUInteger)pageRotation;

    Swift

    init(glyphs wordGlyphs: [PSPDFGlyph], pageRotation: UInt)
  • Initialize with word frame.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithFrame:(CGRect)wordFrame
                             pageRotation:(NSUInteger)pageRotation;

    Swift

    init(frame wordFrame: CGRect, pageRotation: UInt)
  • Returns the content of the word (all glyphs merged together)

    Declaration

    Objective-C

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

    Swift

    var stringValue: String { get }
  • All glyphs merged together in the smallest possible bounding box. As an optimization, only the first and last glyph will be used for frame calculations.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) CGRect frame;

    Swift

    var frame: CGRect { get set }
  • All PSPDFGlyph objects. Frame will be recalculated when glyphs are set.

    Declaration

    Objective-C

    @property (readwrite, copy, nonatomic) NSArray<PSPDFGlyph *> *_Nonnull glyphs;

    Swift

    var glyphs: [PSPDFGlyph] { get set }
  • Set to YES if this is the last word on a textBlock.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) BOOL lineBreaker;

    Swift

    var lineBreaker: Bool { get set }
  • The page rotation of the page this word is from.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSUInteger pageRotation;

    Swift

    var pageRotation: UInt { get }