pub struct Char {Show 13 fields
pub text: String,
pub bbox: BBox,
pub fontname: String,
pub size: f64,
pub doctop: f64,
pub upright: bool,
pub direction: TextDirection,
pub stroking_color: Option<Color>,
pub non_stroking_color: Option<Color>,
pub ctm: [f64; 6],
pub char_code: u32,
pub mcid: Option<u32>,
pub tag: Option<String>,
}Expand description
A single character extracted from a PDF page.
Fields§
§text: StringThe text content of this character.
bbox: BBoxBounding box in top-left origin coordinates.
fontname: StringFont name.
size: f64Font size in points.
doctop: f64Distance from the top of the first page (accumulates across pages).
upright: boolWhether the character is upright (not rotated).
direction: TextDirectionText direction for this character.
stroking_color: Option<Color>Stroking (outline) color, if any.
non_stroking_color: Option<Color>Non-stroking (fill) color, if any.
ctm: [f64; 6]Current transformation matrix [a, b, c, d, e, f] at time of rendering.
char_code: u32Raw character code from the PDF content stream.
mcid: Option<u32>Marked content identifier linking this character to a structure tree element. Set when the character is inside a marked-content sequence with an MCID.
tag: Option<String>Structure tag for this character (e.g., “P”, “H1”, “Span”). Derived from the structure tree element that references this character’s MCID.