pub struct LayoutAnalyzer<'a> { /* private fields */ }Expand description
Layout analyzer for extracting structured text from PDF pages.
Implementations§
Source§impl<'a> LayoutAnalyzer<'a>
impl<'a> LayoutAnalyzer<'a>
Sourcepub fn new(doc: &'a LopdfDocument) -> Self
pub fn new(doc: &'a LopdfDocument) -> Self
Create a new layout analyzer.
Sourcepub fn font_stats_mut(&mut self) -> &mut FontStatistics
pub fn font_stats_mut(&mut self) -> &mut FontStatistics
Get mutable reference to font statistics (for external use).
Sourcepub fn group_spans_into_lines_pub(&self, spans: Vec<TextSpan>) -> Vec<TextLine>
pub fn group_spans_into_lines_pub(&self, spans: Vec<TextSpan>) -> Vec<TextLine>
Public wrapper for group_spans_into_lines.
Sourcepub fn detect_headings_pub(&self, lines: Vec<TextLine>) -> Vec<TextLine>
pub fn detect_headings_pub(&self, lines: Vec<TextLine>) -> Vec<TextLine>
Public wrapper for detect_headings.
Sourcepub fn group_lines_into_blocks_pub(
&self,
lines: Vec<TextLine>,
) -> Vec<TextBlock>
pub fn group_lines_into_blocks_pub( &self, lines: Vec<TextLine>, ) -> Vec<TextBlock>
Public wrapper for group_lines_into_blocks.
Auto Trait Implementations§
impl<'a> Freeze for LayoutAnalyzer<'a>
impl<'a> !RefUnwindSafe for LayoutAnalyzer<'a>
impl<'a> Send for LayoutAnalyzer<'a>
impl<'a> Sync for LayoutAnalyzer<'a>
impl<'a> Unpin for LayoutAnalyzer<'a>
impl<'a> !UnwindSafe for LayoutAnalyzer<'a>
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> 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