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.
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Unavailable

    Undocumented

    Declaration

    Objective-C

    PSPDF_EMPTY_INIT_UNAVAILABLE
  • Frame of the glyph, normalised to take the font of the textblock it is in into account. Doesn’t have the page rotation applied. To apply the rotation, use CGRectApplyAffineTransform(glyph.frame, pageInfo.rotationTransform). PSPDFWord etc. 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 }
  • Checks if after this glyph is a newline character.

    Declaration

    Objective-C

    @property (readonly, nonatomic) BOOL lineBreaker;

    Swift

    var lineBreaker: Bool { get }
  • Checks if glyph is a word boundary (space, parenthesis, control character).

    Declaration

    Objective-C

    @property (readonly, getter=isWordBreaker, nonatomic) BOOL wordBreaker;

    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 }
  • Returns YES if the receiver is an autogenerated filler.

    Declaration

    Objective-C

    @property (readonly, getter=isGenerated, nonatomic) BOOL generated;

    Swift

    var isGenerated: Bool { get }
  • Index of the glyph on the page, and in PSPDFTextParser.glyphs.

    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 }