pub struct Extractor;Implementations§
Source§impl Extractor
impl Extractor
Sourcepub fn extract_text(&self, data: &[u8]) -> ExtractResult<String>
pub fn extract_text(&self, data: &[u8]) -> ExtractResult<String>
Extracts the text of every page, walking the catalog’s page tree and
reading only /Contents streams (never metadata or other objects).
Flate-compressed streams are decoded; Tj/TJ operators are parsed,
including literal strings with escapes, hex strings, and UTF-16BE text.
Text shown with an embedded font is mapped back to Unicode through the
font’s /ToUnicode CMap (bfchar and bfrange).
Sourcepub fn extract_metadata(&self, data: &[u8]) -> ExtractResult<Vec<u8>>
pub fn extract_metadata(&self, data: &[u8]) -> ExtractResult<Vec<u8>>
Renders the /Info dictionary as Key: value lines.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Extractor
impl RefUnwindSafe for Extractor
impl Send for Extractor
impl Sync for Extractor
impl Unpin for Extractor
impl UnsafeUnpin for Extractor
impl UnwindSafe for Extractor
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