pub struct ContentTextShow {
pub font_name: String,
pub font_size: f32,
pub font_dict: Option<Dict>,
pub bytes: Vec<u8>,
pub position: (f32, f32),
pub operator: TextShowOp,
}Expand description
One Tj/TJ/'/" text-show event surfaced by
parse_content_stream_full. The raw operand bytes are preserved
verbatim — escape-decoded for literal strings and hex-pair-decoded
for hex strings — so a consumer that wants byte→Unicode mapping can
route them through whatever decoder its font_dict calls for.
Fields§
§font_name: StringFont resource name as named by the most recent Tf, with the
leading / stripped (e.g. "F1"). Empty when the content
stream issued a show without a preceding Tf (malformed but
tolerated).
font_size: f32Font size from the most recent Tf. 0.0 if no Tf was seen.
font_dict: Option<Dict>Resolved font dictionary from /Resources /Font /<font_name>,
or None when the font wasn’t found in the supplied
font_resources (or no font_resources was supplied).
bytes: Vec<u8>Concatenated payload bytes — for Tj and ' the single
operand; for " the trailing string operand; for TJ the
strings inside the array, concatenated in array order (the
per-element numeric displacements aren’t applied because they
only affect glyph kerning, not the decoded text).
position: (f32, f32)Text-matrix origin (e, f) in user space at the moment the
show fired — the position the first glyph would have been
painted at. Reflects every Tm/Td/TD/T* update issued
inside the enclosing BT … ET (the matrix resets to identity
at every BT).
operator: TextShowOpWhich show operator produced this event (Tj / TJ / ' /
"). Lets a downstream consumer reconstruct the original
operator stream verbatim.
Trait Implementations§
Source§impl Clone for ContentTextShow
impl Clone for ContentTextShow
Source§fn clone(&self) -> ContentTextShow
fn clone(&self) -> ContentTextShow
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more