pub struct TextExtractor;Expand description
Extracts text from a PDF page.
Implementations§
Source§impl TextExtractor
impl TextExtractor
Sourcepub fn extract_text(
content_data: &[u8],
resources: &PdfObject,
doc: &mut CosDoc,
) -> Result<String>
pub fn extract_text( content_data: &[u8], resources: &PdfObject, doc: &mut CosDoc, ) -> Result<String>
Extract all text from a page as a single string.
Takes the page’s content stream data (already decoded) and its resource dictionary for font lookups.
Auto Trait Implementations§
impl Freeze for TextExtractor
impl RefUnwindSafe for TextExtractor
impl Send for TextExtractor
impl Sync for TextExtractor
impl Unpin for TextExtractor
impl UnsafeUnpin for TextExtractor
impl UnwindSafe for TextExtractor
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