pub struct TextBlock {
pub text: String,
pub page: u32,
pub bbox: [f64; 4],
pub font_name: String,
pub font_size: f64,
pub actual_text: Option<String>,
}Expand description
A block of text extracted from a page.
Fields§
§text: StringThe extracted text content.
page: u32The page number (1-based).
bbox: [f64; 4]Bounding box [x0, y0, x1, y1] in PDF coordinates.
font_name: StringFont name used for this text block.
font_size: f64Font size in points.
actual_text: Option<String>/ActualText override from a surrounding marked-content sequence (BDC),
if any. PDF/UA-compliant authors use this to provide the canonical
reading-order text for ligatures or other glyph clusters whose visual
text does not match the intended characters.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TextBlock
impl RefUnwindSafe for TextBlock
impl Send for TextBlock
impl Sync for TextBlock
impl Unpin for TextBlock
impl UnsafeUnpin for TextBlock
impl UnwindSafe for TextBlock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more