PSPDFGlyph


@interface PSPDFGlyph : NSObject <NSCopying, NSSecureCoding>

Represents a single character (glyph, quad) on the PDF page. - note: Glyphs are created from the PDF contents and not meant to be created manually.

  • Undocumented

    Declaration

    Objective-C

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

    Declaration

    Objective-C

    
    @interface PSPDFGlyph : NSObject <NSCopying, NSSecureCoding>
  • Frame of the glyph. Doesn’t have the page rotation applied. To apply the rotation, use CGRectApplyAffineTransform(glyph.frame, pageView.pageInfo.rotationTransform) (PSPDFWord etc do have convenience methods for this)

    Declaration

    Objective-C

    @property (readonly, nonatomic) CGRect frame;

    Swift

    var frame: CGRect { get }
  • Character content (usually a single character)

    Declaration

    Objective-C

    @property (readonly, copy, nonatomic) NSString *_Nonnull content;

    Swift

    var content: String { get }
  • Set if after this glyph a \n is there.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL lineBreaker;

    Swift

    var lineBreaker: Bool { get }
  • Dynamically evaluated. Return YES if glyph is a word boundary (space, parenthesis)

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isWordBreaker;

    Swift

    var isWordBreaker: Bool { get }
  • Returns YES if glyph is end of a word or line.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL isWordOrLineBreaker;

    Swift

    var isWordOrLineBreaker: Bool { get }
  • Index set on the glyph, or -1 for autogenerated fillers. - note: This is not meant to identify glyphs. Get the glyphs array from the text parser and call indexOfObjectIdenticalTo: on it.

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSInteger indexOnPage;

    Swift

    var indexOnPage: Int { get }