PSPDFGlyph
Objective-C
@interface PSPDFGlyph : NSObject <NSCopying, NSSecureCoding>
Swift
class Glyph : 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
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
-
Frame of the glyph, normalized to take the font of the text block it is in into account.
Declaration
Objective-C
@property (nonatomic, readonly) CGRect frame;
Swift
var frame: CGRect { get }
-
Character content (usually a single character).
Declaration
Objective-C
@property (nonatomic, copy, readonly) NSString *_Nonnull content;
Swift
var content: String { get }
-
Checks if after this glyph is a newline character.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL lineBreaker;
Swift
var lineBreaker: Bool { get }
-
Checks if glyph is a word boundary (space, parenthesis, control character).
Declaration
Objective-C
@property (nonatomic, readonly, getter=isWordBreaker) BOOL wordBreaker;
Swift
var isWordBreaker: Bool { get }
-
Returns YES if glyph is end of a word or line.
Declaration
Objective-C
@property (nonatomic, readonly) BOOL isWordOrLineBreaker;
Swift
var isWordOrLineBreaker: Bool { get }
-
Returns
true
if the receiver is an autogenerated filler.Declaration
Objective-C
@property (nonatomic, readonly, getter=isGenerated) BOOL generated;
Swift
var isGenerated: Bool { get }
-
Index of the glyph on the page, and in
PSPDFTextParser.glyphs
. All glyphs from the same page are guaranteed to have unique values for this property.Declaration
Objective-C
@property (nonatomic, readonly) NSInteger indexOnPage;
Swift
var indexOnPage: Int { get }