pub struct StructuredExtractor { /* private fields */ }Expand description
Structured text extractor.
Converts positioned characters into semantic document elements.
Implementations§
Source§impl StructuredExtractor
impl StructuredExtractor
Sourcepub fn with_config(config: ExtractorConfig) -> Self
pub fn with_config(config: ExtractorConfig) -> Self
Create a new structured extractor with custom configuration.
Sourcepub fn extract_page(
&mut self,
document: &mut PdfDocument,
page_num: u32,
) -> Result<StructuredDocument>
pub fn extract_page( &mut self, document: &mut PdfDocument, page_num: u32, ) -> Result<StructuredDocument>
Extract structured content from a page.
§Arguments
document- The PDF documentpage_num- Zero-based page number
§Returns
A structured document with paragraphs and formatting information.
§Errors
Returns an error if the page cannot be processed.
§Note
This method extracts text blocks from the PDF and converts them to paragraphs with formatting information (bold, italic, font size). Header detection, list detection, and alignment detection have been removed for PDF-spec compliance.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StructuredExtractor
impl RefUnwindSafe for StructuredExtractor
impl Send for StructuredExtractor
impl Sync for StructuredExtractor
impl Unpin for StructuredExtractor
impl UnsafeUnpin for StructuredExtractor
impl UnwindSafe for StructuredExtractor
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.