pub struct TextStreamer { /* private fields */ }Expand description
Streams text from PDF content
Implementations§
Source§impl TextStreamer
impl TextStreamer
Sourcepub fn new(options: TextStreamOptions) -> Self
pub fn new(options: TextStreamOptions) -> Self
Create a new text streamer
Sourcepub fn process_chunk(&mut self, data: &[u8]) -> Result<Vec<TextChunk>>
pub fn process_chunk(&mut self, data: &[u8]) -> Result<Vec<TextChunk>>
Process a content stream chunk
Sourcepub fn get_buffered_chunks(&self) -> Vec<TextChunk>
pub fn get_buffered_chunks(&self) -> Vec<TextChunk>
Get all buffered text chunks
Sourcepub fn clear_buffer(&mut self)
pub fn clear_buffer(&mut self)
Clear the buffer
Sourcepub fn extract_text(&self) -> String
pub fn extract_text(&self) -> String
Extract text as a single string
Auto Trait Implementations§
impl Freeze for TextStreamer
impl RefUnwindSafe for TextStreamer
impl Send for TextStreamer
impl Sync for TextStreamer
impl Unpin for TextStreamer
impl UnwindSafe for TextStreamer
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